--sizing-*
is not allowed to be used when generating functional utilities
#18061
-
What version of Tailwind CSS are you using? v4.1.7 What build tool (or framework if it abstracts the build tool) are you using? No build tool, using distributed CSS file directly. What version of Node.js are you using? v22.12.0 What browser are you using? Firefox 138.0.3 What operating system are you using? Windows Reproduction URL Describe your issue I have created multiple functional utilities with v4.1.7 before but for some reason the It works when I use When attempting to use this and build it via the Error: Cannot apply unknown utility class: min-size-4 The script I'm executing via tailwindcss -i ./path/to/file.css -o ./path/to/file.dist.css |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Looks like you're trying to use @import "tailwindcss";
@theme {
/* ... */
}
@utility min-size-* {
min-width: --value(--sizing- *);
min-height: --value(--sizing- *);
}
Is this what you're trying to do? With |
Beta Was this translation helpful? Give feedback.
You can use
--spacing(x)
which is syntactic sugar forcalc(var(--spacing) * x)
: https://play.tailwindcss.com/5mgZeqBdhX?file=cssThis also enables intellisense suggestions of the predefined spacing scale.