Scoped TailwindCSS #2976
-
|
We have a React project that uses styled-components that we want to migrate to TailwindCSS. The issue is that our CSS did not have sufficient reset styling, so importing TailwindCSS breaks the styling in a lot of places where our styled-components CSS was dependent on the default user stylesheet. So, we thought we import TailwindCSS in select places. Having TailwindCSS styles prefixed with an id, we could freely import TailwindCSS but only use it by specifying an id on a given component. Adding {
important: '#tailwind',
}Is there a way to have all TailwindCSS styles scoped by a selector? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
https://github.com/RadValentin/postcss-prefix-selector might be what you need. |
Beta Was this translation helpful? Give feedback.
https://github.com/RadValentin/postcss-prefix-selector might be what you need.