Replies: 1 comment 1 reply
-
I think you have some other CSS transformations happening outside of Tailwind causing that syntax behavior. As per this Tailwind Play, Tailwind v4 by default outputs it as: @layer utilities {
.border-spacing-1 {
--tw-border-spacing-x: calc(var(--spacing) * 1);
--tw-border-spacing-y: calc(var(--spacing) * 1);
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
} Adding: @utility border-spacing-* {
border-spacing: --spacing(--value(integer));
} Then outputs: @layer utilities {
.border-spacing-1 {
--tw-border-spacing-x: calc(var(--spacing) * 1);
--tw-border-spacing-y: calc(var(--spacing) * 1);
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
.border-spacing-1 {
border-spacing: calc(var(--spacing) * 1);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So by default Tailwind CSS 4 outputs
border-spacing
utilities like this:Since I can't use that in my environment (HTML emails), I need a way to have it just output the selector, without the
@
rules:Tried stuff like this but it obviously doesn't work:
Is this possible in some way, so I don't have to use arbitrary variants? Lightning won't lower that syntax so need to find another way.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions