[V4] How to create custom functional utility with spacing variables and auto suggest in vs code? #17353
-
I now want to create a custom utility using the new system that also suggests the same permutations. But the docs for functional utilities (https://tailwindcss.com/docs/adding-custom-styles#functional-utilities) fail to mention how to do that. @utility foobar-* {
padding-left: --value(--spacing-*); // does not work
padding-right: --spacing(*); // does not work
padding-top: --spacing(4); // does work, but obviously ignores the utilities parameter
padding-bottom: --spacing(--value(integer)); // does sorta work, but fails to auto suggest like `mt-*` does
} custom It feels like this should be trivial and I must be missing something very obvious. Would appreciate the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
|
Beta Was this translation helpful? Give feedback.
We merged some features recently for exactly this use case: #17308
But we don't have any APIs yet for your own suggestions.