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

Add styling for new callout feature #40

Open
laurastephsmith opened this issue Mar 24, 2022 · 3 comments
Open

Add styling for new callout feature #40

laurastephsmith opened this issue Mar 24, 2022 · 3 comments

Comments

@laurastephsmith
Copy link

v0.14.0 (currently in beta) offers callout boxes (https://help.obsidian.md/How+to/Use+callouts). It would be brilliant if you could support these to look stylish and at home in Typomagical! Black and white? Not so modern-looking?

@laurastephsmith
Copy link
Author

I've done this as a starter, but maybe you can prettify it a bit more!

.theme-light .callout {
    --callout-color: 207, 207, 207 !important;
    background-color: #ffffff !important;
    border: 1px solid rgb(207, 207, 207);
}

.theme-light .callout .callout-title .callout-icon {
    color: #2E3338;
}

.theme-dark .callout {
    --callout-color: 51, 51, 51 !important;
    background-color: transparent !important;
    border: 1px solid rgb(51, 51, 51);
}

.theme-dark .callout .callout-title .callout-icon {
    color: #DCDDDE;
}

@hungsu
Copy link
Owner

hungsu commented Mar 28, 2022

Hi Laura, thanks for your suggestion, it's very exciting that callouts have reached public access!

I won't be using your code for a few reasons:

  • !important - Part of the reason I created Typomagical was because so many themes are in a "specificity war", and this was a notable complaint about my previous theme, Vileplume. Themes trying to override each other with ever more specific selectors, then ultimately giving up and using !important, which just leads to !important on top of !important...I wrote Typomagical to not do that, and I won't use it unless I absolutely must
  • The colours you chose only work for the Obsidian colour palette. My other major colour palette is Ficus Ruby and I'll have to think about what to do for that

I'm quite enjoying callouts so rest assured I'll be thinking about this

@laurastephsmith
Copy link
Author

Ha! I didn't even know you could override !Important with another !important. But that way madness lies... :). No worries, just something I threw together quickly to solve the eyesore for me for now. I'm sure based on what I've seen of your work you can come up with an idea that looks better than I did - glad it's on your to do list somewhere!

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

No branches or pull requests

2 participants