Migrate default utilities to have a value suffix#14875
Conversation
5e33444 to
bd34125
Compare
philipp-spiess
left a comment
There was a problem hiding this comment.
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.
| - _Upgrade (experimental)_: Migrate `grid-cols-[subgrid]` and `grid-rows-[subgrid]` to `grid-cols-subgrid` and `grid-rows-subgrid` ([#14840](https://github.com/tailwindlabs/tailwindcss/pull/14840)) | ||
| - _Upgrade (experimental)_: Rename `grid-cols-[subgrid]` and `grid-rows-[subgrid]` to `grid-cols-subgrid` and `grid-rows-subgrid` ([#14840](https://github.com/tailwindlabs/tailwindcss/pull/14840)) | ||
| - _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.
"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.
I did mean suffix, oops. How about this:
There was a problem hiding this comment.
Yeah I think this is the clearest, albeit a bit verbose 👍
There was a problem hiding this comment.
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:
shadowshadow-smshadow-smshadow-xsshadow-xsshadow-2xsinset-shadowinset-shadow-sminset-shadow-sminset-shadow-xsinset-shadow-xsinset-shadow-2xsdrop-shadowdrop-shadow-smdrop-shadow-smdrop-shadow-xsroundedrounded-smrounded-smrounded-xsblurblur-smblur-smblur-xsAlso added an integration test to ensure that
shadowis properly migrated toshadow-sm, and doesn't get migrated toshadow-xs(becauseshadow-smis migrated toshadow-xs).