You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignore --tw- variables during internal signature computation (#19156)
This PR improves some of the signature computation logic. Right now, when you want to convert `[font-weight:400]` to `font-normal` it's not going to work because the signatures don't like up: ```css /* [font-weight:400] */ .x { font-weight: 400; } /* font-normal */ .x { --tw-font-weight: 400; font-weight: 400; } ``` So this PR essentially ignores `--tw-{property}` _if_ the `{property}` exists with the exact same value. The main reason we have this, is to make composition of utilities easier. As with any of these upgrades, they are the expected behavior in most cases, but there could always be a case where you don't want this, but that's why the upgrade tool requires you to review each change before applying it. Intellisense will recommend the simplified class, but it's up to you to decide if you want to apply it or not. There is a known edge case for `leading-{num}`, because the property is `line-height` and the CSS variable is `--tw-leading`. Right now we map `--tw-leading` to `line-height` but we can also update the leading classes to use `--tw-line-height` instead but that feels like a bigger breaking change _if_ people rely on these internal CSS variables...
0 commit comments