Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Abstract the "Minimal Cards Tweak" code into a toggle option #262

Open
HynDuf opened this issue Apr 2, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@HynDuf
Copy link

HynDuf commented Apr 2, 2024

Feature Description
Recently, I try using "Minimal Card" css snippet from kepano Minimal theme and notice the unexpected margin of the image in the card. Search around and the culprit was the Minimal Card Tweak code. It would be better if the user can toggle that on or off depends if they want it or not. Thanks.

The part of code is:

/*-------Tweak for Minimal Cards--------------
Minimal cards are a snippet designed by Kepano for the Minimal theme.
None of the original code was used in this theme, and the following code is merely some tweaks to the snippet.
--------------------------------------------*/
.cards .table-view-table > tbody > tr > td:last-child {
  border-bottom-color: transparent !important; /*-No border for last cell-*/
}
.cards .table-view-table > tbody > tr > td:first-child {
  width: 100% !important; /*-Max width for first cell-*/
  border-bottom: 1px dashed var(--background-modifier-border) !important; /*-Border for first table that spans to the end because of max width-*/
}
.cards .table-view-table > tbody > tr > td:first-child span {
  margin: 2px calc(var(--cards-padding) * 0.5) 0 calc(var(--cards-padding) * 0.5); /*-Add padding to text-*/
}
.cards .table-view-table > tbody > tr > td:first-child span a {
  padding: 0 !important; /*-0 padding on link-*/
}
.cards .table-view-table > tbody > tr > td:not(:last-child):not(:first-child) > .el-p.el-p.el-p:not(.el-embed-image) {
  border-bottom: 1px dashed var(--background-modifier-border);
}
.cards:not([class*=cards-cols-]) {
  --cards-columns: repeat(auto-fit, minmax(var(--cards-min-width), var(--cards-max-width))); /*-force card width to be obeyed on notes not having cards-cols css class-*/
}
...

Here is before I commented those code off
image

Here is after (notice the left margin disappear)
image

I don't know if it's my css snippets' faults or not, but that margin: 2px... might be the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants