[v4] Problem with custom spacing - v4 is referencing var(--container-*) instead of var(--spacing-*) #15145
Unanswered
steveclarke
asked this question in
Help
Replies: 1 comment 2 replies
-
So As per #15146, seems like the migration tool should account for this difference. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my Tailwind v3 project I have the following custom named spacing:
I'm then able to use
class="w-lg h-lg"
in my project. In version 3,w-lg
andw-hg
are correctly being set towidth: 2rem
, andheight; 2rem
, respectively.When I upgraded to v4, the above configuration got converted to:
Now my
h-lg
continues to work as expected. However, myw-lg
is using thecontainer-lg
value. The generated CSS looks like:Notice that
h-lg
references the CSS variable--spacing-lg
, butw-12
references the CSS variable--container-lg
This causes content width to be incorrect after the upgrade. Wondering if this is a known issue?
For the following HTML:
V3
V4
Beta Was this translation helpful? Give feedback.
All reactions