How do replace @apply when it comes to spacing? #19697
-
|
I've begun updating my project from TW 3 to TW 4. The most annoying thing is the inability to use So with the push to not use It's easy for Is my only solution to do Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
You can use the .my-element {
width: --spacing(60);
}V4 changed how some of these utilities work, opting to have an infinite spacing scale rather than set values. Thus, in this new system, |
Beta Was this translation helpful? Give feedback.
You can use the
--spacing()helper function:V4 changed how some of these utilities work, opting to have an infinite spacing scale rather than set values. Thus, in this new system,
var(--spacing)is multiplied to give the equivalents of the spacing values in v3.