Tailwind 4.0 not usable with any system that provides its own styles #15466
Unanswered
StevenStavrakis
asked this question in
Help
Replies: 1 comment
-
I asked about this too in #13188. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm making a plugin for Obsidian. Obsidian comes with its own default set of styles. In previous versions of Tailwind, styles did not compile with layers, allowing the Tailwind styles to override default styles for elements (e.g., h1 tags).
Additionally, Obsidian adds plugin styles by taking the content of the
styles.css
and adding it directly into a<head>
tag.Due to the final
styles.css
file retaining the layers, the default global styles of Obsidian overrule tailwind utilities, making it impossible to use utility classes for text color, resizing text, etc. Tailwind 3.x had theimportant
flag in its config, which, while I never used it, I assume was partly to address scenarios like this.I'm missing something, or there is some build-step configuration I can implement to change this behavior, but I haven't found anything so far. This seems a somewhat common issue (see #15074), but the Tailwind team has yet to respond. If, going forward, Tailwind is no longer suitable for projects that involve CSS from other sources, I would prefer to know sooner rather than later.
Beta Was this translation helpful? Give feedback.
All reactions