-
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
Just-In-Time on-demand '!important' modifier does not work with variants #4823
Comments
Hey, thanks for the reproduction! I can confirm that Started a PR with a failing test here: Hopefully can look at this in the near future. |
RobinMalfait
pushed a commit
that referenced
this issue
Aug 27, 2021
RobinMalfait
pushed a commit
that referenced
this issue
Aug 27, 2021
* Add failing test for #4823 * Fix important variant `@apply` Co-authored-by: Brad Cornes <[email protected]>
Hey! Thank you for your bug report! This has been fixed and will be available in the next release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Tailwind CSS are you using?
v2.2.4
What build tool (or framework if it abstracts the build tool) are you using?
"vue": "^3.0.5", "vite": "^2.3.8"
What version of Node.js are you using?
v14.17.0
What browser are you using?
Microsoft Edge 91.0.864.59
What operating system are you using?
macOS 11.4
Reproduction repository
https://github.com/draganovik/tailwindcss-jit-variant-important-error
Describe your issue
I needed to override some plugin's custom inline CSS that gets injected in HTML element on click,
I tried a tailwind command:
h1 { @apply dark:!text-green-500; }
to override style in dark mode but it didn't work.
Then I manually set:
@media (prefers-color-scheme: dark) { h1 { @apply !text-green-500; } }
And it worked fine.
I don't know if [variant]:![tailwind-class] is supported but it feels like it should be.
The text was updated successfully, but these errors were encountered: