Closed stormfar closed 1 year ago
Hey @5tormTrooper,
Thanks for the request and nice idea. I've added this functionality in #6. Let me know if that works for you.
I've updated the options to support a string array. With your example, it would be
"postcss-scope": ["#__next", "#second-el"]
Works like a charm. Thanks!
I need to apply the tailwind classes to multiple root elements, as I'm using HeadlessUI, which adds Dialogue and Portal components to the root level (e.g.
#headlessui-portal-root
is appended to thebody
), which use TailwindCSS classes.Since there is no current solution for change the root element for those components (see: https://github.com/tailwindlabs/headlessui/discussions/666), it seems like the simplest solution is to target multiple root elements here.
If I add this
to postcss.config.js, The selectors are generated like this:![CleanShot 2023-08-07 at 11 26 39](https://github.com/jackall3n/postcss-scope/assets/4154407/af51b8b1-40b5-451f-8728-2db60527c5e8)
Could
postcss-scope
consider comma-separated selectors in the config?