-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
TW 3.2.0 regression: @apply
incorrectly modifies selectors containing pseudo-classes
#9668
Comments
@apply
statements in deeply nested selectors
Same here. Using tailwind with Angular resulted in the following code: :host.class .nested {
@apply text-center;
}
} Instead of the expected output .class[_nghost-xak-c153] .nested {
text-align: center;
} resulted in: .class.nested[_nghost-xak-c153] {
text-align: center;
} However, I can get the desired result if I change the syntax to: :host(.class) .nested {
@apply text-center;
} I took a look at the changelog and the changes that happened in the lock file and I believe this can be related to |
@apply
statements in deeply nested selectors@apply
incorrectly modifies selectors containing pseudo-classes
Small side note:
This is because |
Hey! Thank you for your bug report! This should be fixed by #9722, and will be available in the next release. You can already try it by using the insiders build |
I want to send a reproduction playground url but the issue was closed during writing this comment. Thank you, @RobinMalfait , for the fix. |
Amazing, thankyou for the rapid fix. |
@gynekolog yep! If you switch to the I'll also make sure to do a release asap. |
What version of Tailwind CSS are you using?
Appears in 3.2.0, also occurs in 3.2.1 (current latest)
What build tool (or framework if it abstracts the build tool) are you using?
"ember-cli-postcss": "^8.2.0",
"postcss": "^8.4.18",
What version of Node.js are you using?
v16.17.0
What browser are you using?
N/A
What operating system are you using?
ubuntu
Reproduction URL
I attempted to create a Tailwind Play link, but couldn't figure out how to add tailwind nesting plugin :( The plugins property in config expects an array, but the docs on tailwind website has plugins as an object!
Here it is, if you can get
tailwindcss/nesting
working...https://play.tailwindcss.com/cm3UJrabZH?file=css
Describe your issue
This very specific input (I think the
&:not([some-attribute])
plays a big part here)ends up in the following output
tailwind 3.1.8 🟢
tailwind 3.2.0+ 🔴 (the tailwind apply results in an incorrect interpretation of the selector it was in)
The text was updated successfully, but these errors were encountered: