-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly migrate
leading-*
classes (#16004)
This PR fixes the upgrade tool by properly migrating the `leading-[<number>]` classes. The issue is that `leading-[<number>]` maps to the number directly, but if you use a bare value, then it's a multiplier for based on the `--spacing` value. E.g.: *leading-[2]*: ```css .leading-\[2\] { --tw-leading: 2; line-height: 2; } @Property --tw-leading { syntax: "*"; inherits: false; } ``` *leading-2*: ```css .leading-2 { --tw-leading: calc(var(--spacing) * 2); line-height: calc(var(--spacing) * 2); } @Property --tw-leading { syntax: "*"; inherits: false; } ``` This PR will now prevent migrating arbitrary values to bare values for `leading-*` utilities. That said, this does introduce a small improvement where `leading-[1]` is migrated to `leading-none`. Fixes: #15924
- Loading branch information
1 parent
125c089
commit 3da9d61
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters