Skip to content

Change casing of utilities with named values to kebab-case to match u… - #18017

Merged
philipp-spiess merged 1 commit into
mainfrom
fix/casing-named-values
May 14, 2025
Merged

philipp-spiess merged 1 commit into
mainfrom
fix/casing-named-values

Conversation

@philipp-spiess

@philipp-spiess philipp-spiess commented May 14, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #16156

Summary

This PR adds a new 3 -> 4 template migration that changes the casing of in both utility values and modifier values from camelCase to kebab-case to match the updated CSS variable names.

Test plan

  • Added integration test, see the diff in the PR.

@philipp-spiess
philipp-spiess requested a review from a team as a code owner May 14, 2025 11:27
@philipp-spiess
philipp-spiess force-pushed the fix/casing-named-values branch 2 times, most recently from 6d6550c to 052f362 Compare May 14, 2025 11:28

@RobinMalfait RobinMalfait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense! I just think we should add an integration test to verify named modifiers.

Another thing is named modifiers for variants, like a named group/foo and then you can use it as group-hover/foo, but this is only updating the actual base candidate not the variants so I think we're good!

400: '#f87171',
500: 'red',
},
superRed: '#ff0000',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add a test to ensure that a named modifier is actually converted to kebab-case as well?

@philipp-spiess
philipp-spiess force-pushed the fix/casing-named-values branch from eeb65b2 to ac9920d Compare May 14, 2025 11:43
@philipp-spiess
philipp-spiess force-pushed the fix/casing-named-values branch from ac9920d to b3f34ed Compare May 14, 2025 11:45
@philipp-spiess
philipp-spiess merged commit e57a2f5 into main May 14, 2025
@philipp-spiess
philipp-spiess deleted the fix/casing-named-values branch May 14, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v4] Tailwind v4 upgrade script renames camelCase'd colors/fonts to kebab-case, but does not update usages.

2 participants