-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Migrate default utilities to have a value suffix #14875
Conversation
5e33444
to
bd34125
Compare
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.
LGTM just some bike shedding on the change log entry 😄 Feel free to use this feedback at your own discretion. I'll stamp this, we can always tweak the changelog before the release.
CHANGELOG.md
Outdated
- _Upgrade (experimental)_: Support migrating projects with multiple config files ([#14863](https://github.com/tailwindlabs/tailwindcss/pull/14863)) | ||
- _Upgrade (experimental)_: Rename default utilities (such `shadow`, `blur` and `rounded`) to have a value prefix ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) |
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.
"to have a value prefix" isn't clear (also I think you mean suffix here?)
Maybe we can reference the changed section in the changelog here somehow (.. rename shadow
, inset-shadow
, drop-shadow
, rounded
, and blur
utilities in accordance with the changes made in this version) it's clearer to what we do (or even repeat the exact examples that we have for drop-shdow
to drop-shadow-sm
etc.
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 did mean suffix, oops. How about this:
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.
Yeah I think this is the clearest, albeit a bit verbose 👍
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.
That's exactly what we did in the PR where we introduced these changes, so just used that as a reference. d1724fd
rounded and blur
This is to ensure that we migrate `blur` to `blur-sm`, and don't migrate again, because then this would be converted to `blur-xs` and that's not what we want.
81606c9
to
caafd6a
Compare
This PR fixes an issue where we migrated classes such as `rounded` to `rounded-sm` (see: #14875) However, if you override the values in your `tailwind.config.js` file, then the migration might not be correct. This PR makes sure to only migrate the classes if you haven't overridden the values in your `tailwind.config.js` file. --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com>
This PR adds a migration for migrating the changes we implemented in #14849
This is the migration we perform:
shadow
shadow-sm
shadow-sm
shadow-xs
shadow-xs
shadow-2xs
inset-shadow
inset-shadow-sm
inset-shadow-sm
inset-shadow-xs
inset-shadow-xs
inset-shadow-2xs
drop-shadow
drop-shadow-sm
drop-shadow-sm
drop-shadow-xs
rounded
rounded-sm
rounded-sm
rounded-xs
blur
blur-sm
blur-sm
blur-xs
Also added an integration test to ensure that
shadow
is properly migrated toshadow-sm
, and doesn't get migrated toshadow-xs
(becauseshadow-sm
is migrated toshadow-xs
).