Skip to content

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

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

philipp-spiess
Copy link
Member

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

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
Copy link
Member

@RobinMalfait RobinMalfait left a comment

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!

@@ -30,6 +30,7 @@ test(
400: '#f87171',
500: 'red',
},
superRed: '#ff0000',
Copy link
Member

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
7 checks passed
@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