-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Using custom variants in utilities with important feature #8305
Comments
Hey! What do you mean by “if the variant is used in the HTML” and “if the variant is used in the utility”? Can you give examples of each so I understand for sure? |
I should've been more clear 😄 By html i mean using variant like so By utility i mean first defining your custom utility so:
And then using it like this It is also in the playground https://play.tailwindcss.com/WxwCNZmQFX If you take a look at the generated css for the example above then we get:
|
Hey! Thanks for clarifying. This issue also applies when using things like Thanks again! 🎉 |
Hello. I've confirmed that this is resolved when using the latest insiders build 🥳 Thanks a lot for your help! |
What version of Tailwind CSS are you using?
3.0.24
What build tool (or framework if it abstracts the build tool) are you using?
postcss-cli 9.1.0
What version of Node.js are you using?
16
Reproduction URL
https://play.tailwindcss.com/WxwCNZmQFX
Describe your issue
I want to setup custom variant for the webpage if it is loaded inside the iframe.
When using this custom variant together with
important: '#csc-app'
feature it produces different selectors if the classes are defined in the html or in the utilities.If the variant is used in the html then
.usage-variant_iframe
selector comes after the important selector:If the variant is used in the utility then
.usage-variant_iframe
selector comes before the important selector:As a work around i'm adding the
.usage-variant_iframe
twice right now. Once before the#csc-app
div and second time after, but it would be great if this can be consistent.The text was updated successfully, but these errors were encountered: