Preflight selectors respect important selector strategy config #17939
Closed
zacharykane
started this conversation in
Ideas
Replies: 2 comments
-
Bah, apologies I somehow did not see this other Discussion (it's already a long day...) |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can add Preflight into the scoping selector, though you would still need to copy the |
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 trying to incorporate Tailwind in a very large monolith/monorepo environment. There are tons of legacy styles that in the fullness of time the company hopes to move away from but for now and a long while they must remain. I found that using the important configuration option I could declare a scoping selector that I can make sure all of the new code is a descendant of which is working great for the generated classes.
However all of the Preflight styles which use a lot of tag selectors are not written to the final CSS with that scope class before them. I think it would be nice if I could keep Tailwind's Preflight for my new work so that
et cetera function for me, but not have those collide with old in-house/Bootstrap/MUI and other "resets" that exist. Coordinating across my application just isn't feasible since there are way too many teams to find out how to order all of our stylesheets in a particular way to avoid these conflicts.
The only thing I can think of is disabling Preflight entirely, copying out your reset and writing it back but with my scope class before everything. Is there a better way forward?
Beta Was this translation helpful? Give feedback.
All reactions