nhannht / obsidian-historica

https://historica.pages.dev
MIT License
26 stars 0 forks source link

Historica changes some Obsidian layout values #3

Open berzernberg opened 3 months ago

berzernberg commented 3 months ago

When Historica plugin is on, it changes some Obsidian theme layout values. I've noticed it in spacing between settings pages and in my OZ Calendar files list. Demonstrations in attachments below:

CopyQ GHCSCE image

berzernberg commented 3 months ago

I wanted to fix it by myself but somehow styles.css file of your plugin opens in Visual Studio Code editor without any line breaks, as a plain chunk of text. I am not smart enough to find there any related values)) image

nhannht commented 3 months ago

Oh my god, I am so so sorry. I knew it from the start.

Because this project using tailwind to generate CSS. And the prelight, which was injected by default by tailwinds to "to smooth over cross-browser inconsistencies and make it easier for you to work" (that is what Tailwind designer stated in their document).

I was careful using all plugin's CSS classname starting with historica to ensure they would not conflict with other CSS styles from Obsidian and other plugins. But prelight is different, it overwrites most of the default HTML element selectors.

But it is unlucky for me that Obsidian's default CSS conflicts with this behavior. I am trying to fix some conflicts like the button. But in general, someone with sharp eyes will inevitably spot the strange behaviors.

Maybe I can try to fix the problem with OZ calendar in the next patch. But about other details, like spacing, fixing them are very risky choices, because they are common HTML element selectors, which will break almost everything if I did something wrong.

Again, I am very sorry for the inconvenience, maybe you can just stop using my plugin.