Replies: 3 comments 5 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
You can currently declare custom utilities, but you should use the @import "tailwindcss";
@theme {
--spacing-x: --spacing(4);
--spacing-y: --spacing(8);
}
@utility mx-* {
margin-inline: calc(var(--spacing-x) * --value(integer));
}
@utility my-* {
margin-block: calc(var(--spacing-y) * --value(integer));
}If you write the necessary post-processing plugin, it won't add any overhead to your application, as you only need to run it during the build process (simply to maintain the size efficiency of the compiled CSS). During development, the duplication isn't an issue because the .mx-4 {
margin-inline: calc(var(--spacing) * 4);
}
.mx-4 {
margin-inline: calc(var(--spacing-x) * 4);
}These types of duplications are easily recognizable, as the previous declaration must contain the |
Beta Was this translation helpful? Give feedback.
-
|
Solved here: #19366 (reply in thread) |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
It is currently not possible to have separate row/column gaps within @theme customization.
Beta Was this translation helpful? Give feedback.
All reactions