-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't style Dialog when prefixing tailwind classes with a selector #998
Comments
Hey! Thank you for your bug report! This is because the If possible, I would move the |
@RobinMalfait Thank you for the response. It's not possible to move the styling to the body. We are using micro frontends, where each instance uses a different tailwind prefix to prevent class collision due to CSS precedence. A hack that I used was to add the |
Please reopen this. I need this functionality as well. I'm exporting a package to be used in an existing project and the tailwind classes need to be scoped. Dialog not allowing me to use my own portal is causing issues. Also there's a discussion related to this here: #666 |
2 years since #666 and headlessui still doesn't support this basic functionality... |
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
1.4.2
What browser are you using?
Chrome
Reproduction URL
https://github.com/subeshb1/headless-ui-issue
Describe your issue
When prefixing tailwind classes with a selector in the configuration https://tailwindcss.com/docs/configuration#important,
the Dialog component doesn't get applied with styles since it's rendered via a portal i.e outside the specified selector.
Screen.Recording.2021-12-22.at.8.51.09.AM.mov
The text was updated successfully, but these errors were encountered: