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

Example Callout not styling properly when in Custom Style #223

Open
0xOktAvIan opened this issue Feb 19, 2024 · 4 comments
Open

Example Callout not styling properly when in Custom Style #223

0xOktAvIan opened this issue Feb 19, 2024 · 4 comments

Comments

@0xOktAvIan
Copy link

0xOktAvIan commented Feb 19, 2024

Obsidian Debug Information

SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.5.3
Operating system: Windows 10 Home 10.0.22631
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 2
Plugins enabled: 2
1: LaTeX-like Theorem & Equation Referencer v2.2.0
2: MathLinks v0.5.3

Description of the problem

I am tinkering with the custom style to get the callouts exactly to my liking, when I noticed this:

When in MathWiki style, all (to my knowledge) callouts render like this: MathWiki style.

When using this css file from the repository (and as linked to from here), which to my knowledge should have the same effect, the resulting render is this: Custom style. As you can see, the Example callout renders in the default Obsidian style.

Current workaround

Adding this css snippet to the file solves the issue:

.callout[data-callout="example"] {
    --callout-color: 248, 248, 255;
    --callout-icon: '[THE SVG FROM THE FILE ABOVE]';
}

fixes the issue.


Edit: typo/precision

@RyotaUshio
Copy link
Owner

Thank you for the detailed report.

In fact, this is not a bug.
Please take a look at the following footnote in the docs:

> [!example] conflicts with Obsidian's built-in callout type. There is a setting called Don't treat "> [!example]" as a theorem callout, and if it's turned on, an "example" theorem callout can be inserted only with the alias syntax > [!exm].↩︎

@RyotaUshio
Copy link
Owner

Oh wait, it might be a bug. So you mean the option I mentioned above behaves differently between when in custom styles and when in The preset MathWiki style?

@0xOktAvIan
Copy link
Author

Turning this option on / off does nothing when in Custom style unfortunately. In MathWiki style it works as intended.

@RyotaUshio
Copy link
Owner

Thanks, I will look into this when I have time!

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