Replies: 1 comment
-
You could consider running Tailwind as a PostCSS plugin, which would then allow you to have another PostCSS plugin that can run after it. This plugin could then modify the rules in question to add the scope to the selectors. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
My tailwind project is built to be consumed by other apps. Because of that I do not want any tailwind classes to apply to any scope outside of a specified class (in this case
.ui
)For the most part, this is achieved with the
tailwindcss-scoped-preflight
package which I can use to apply a strategy to any rules encountered in the preflight. However, there is a bit of code at the end of the@tailwind base
which does not get processed and it looks like thisI need this to be generated as
.ui *, .ui ::before, .ui ::after
like other sections of@tailwind base
are when using the scoped preflight package. From what I can tell this section of the generated CSS is dynamic compared to other parts ofbase
which is what causes the problem, but if there is a solution besides manually editing this output it would be extremely helpful.(there is also a
::backdrop
section right below this in the CSS output that has the same issue)Thanks
Beta Was this translation helpful? Give feedback.
All reactions