Is there a way to use a clamp as a var ?
I'm using the same clamp for some of my gaps and margins and i would like to store it in a var but it doesn't seems to work. It could also be useful for font sizing. Is there a way to do so ?
6 Replies
what does it look like?
(values are okward but it allows the min value to be reached at 768px wich is my phone breakpoint and max at 1200px)
looks ok but i would set the variable on :root not a * https://codepen.io/MannixMD/pen/vYrxRyj
there is definitively something i did wrong ^^
Yeah, put your variables on
::root
. Otherwise you’re setting that variable on *every * element when you only need it on the onewrong selector maybe ?