-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Document the important
option
#2030
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/docs/theme.mdx
Outdated
|
||
The `important` option can be used to make all utilities have a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `important` option can be used to make all utilities have a |
src/docs/theme.mdx
Outdated
|
||
```css | ||
/* [!code filename:app.css] */ | ||
/* [!code word:important] */ | ||
@import "tailwindcss" important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should also explain where to put that important
if you de-sugar that import (i think it's on the @import "tailwindcss/utilities.css"
right?)
src/docs/theme.mdx
Outdated
@import "tailwindcss" important; | ||
``` | ||
|
||
To generate individual utilities as `!important`, use the `!` syntax at the end of a utility class: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this has changed from v3 (where !
always appeared at the beginning of a utility class), this should be mentioned on the upgrade
page as well.
This PR adds documentation for the
important
option on the@import "tailwindcss";
at-rule.Remaining questions:
/docs/configuration
to/docs/theme
, so not 100% sure)#app
selector strategy that is mentioned in the v3 docs?Fixes: #2028