I would love to implement fluid letter-spacing using the clamp function in CSS. But as i like my letter spacing tight, i would need to have three negative values in the formula and tried now for hours to figure this one out. Do I have to switch the min and max values, as they are negative?
letter-spacing: clamp(-1px, -1vw, -3px);
I need to have more space, the smaller the font gets, not in a linear way. Any idea on how this could be achieved would be most appreciated.
You could use probably:
letter-spacing: calc(clamp(-1px, -1vw, -3px) * -1);
You gotta turn around those values. As the first one is the minimum value and the last one the maximum. -3px is smaller than -1px. I made the spacing larger so you can see it. But this works totally fine for me.
p {
letter-spacing: clamp(-30px, -10vw, -10px);
}
<p>
Hello
</p>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With