padding-left not applied when using CSS clamp() with custom properties in utility class #18457
-
Hi everyone, I'm currently attempting to create a fluid utility class for padding-left using CSS custom properties and clamp(). However, despite all variables being correctly defined and rendered in the final CSS output, the padding-left is not applied in the browser. https://play.tailwindcss.com/GMld5klVSF Here's the setup:
Additional notes:
My guess: Thanks in advance for any insights you might have 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The problem is the
So the types become:
This is invalid since you cannot multiply or divide
|
Beta Was this translation helpful? Give feedback.
The problem is the
calc()
expression insideround()
. Breaking it down by types:So the types become:
This is invalid since you cannot multiply or divide
<length>
types together. Only one of these type signatures would work: