[v4] Enable non-layered addition of CSS to plugins #15074
zoltanszogyenyi
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Did you solve this? I have a similar problem writing a wordpress plugin. I want to over-ride some of the styles in WordPress with Tailwind styles - but because tailwind styles are in an @layer, they have lower precedence than the styles in the WordPress stylesheet that are in an anonymous layer - which have higher precedence than styles in an @layer. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would just use a CSS file for all this stuff, why does it need to be a plugin? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating plugins we use
addBase
,addComponents
etc.It's important that we are able to add styles outside of the layered constraints of Tailwind CSS.
One use case is that specificity will be low within any layer from Tailwind compared to an outside library, such as ApexCharts.
Example:
So here we are overriding some styles from the parent ApexCharts library as we have included their CDN, but we can't override them via the plugin at all because they are added to the
utilities
layer which by definition has lower specificity than the normal CSS.Current working use case in v3: https://flowbite.com/docs/plugins/charts/
Beta Was this translation helpful? Give feedback.
All reactions