Letter-spacing should not be percentage based

I would like letter-spacing when shared to display “x% (0.xxem)”

I’ve had to fix frontend design bugs from my junior developers because they put letter-spacing: 1% in the css and didn’t validate it does nothing. The difference is imperceptible to some people (and very obvious to me). We taught them 1% actually means 0.01em. Figma might as well help us help ourselves.

What’s more annoying about this is that, if you set a number variable with a value of 0.02 and apply it to the letter spacing property, it will be applied as a pixel value. In other words, even though the default unit for letter spacing is indeed %, there’s no way to apply a percentage value to it as a variable.

3 Likes

I found the same problem, which makes trying to use letter spacing values as variables more complicated.

Since we can’t specify a variable in %, we’d have to use modes to set various px values if we’re also using modes for font size.

Thought I should also add in, this has been bugging for about a year now and I only just learnt that % is equal to em, which would’ve saved me a lot of trouble over the years as I’ve just been eye-balling it until now.

At the very least, they could add an optional setting to change the unit.

1 Like

Hey All, thanks for the feedback and sorry for the lack of acknowledgment here!

We’ll pass this onto the team for future consideration.

2 Likes

The problem with using pixel for letter spacing is that it won’t scale for for different font sizes.

Ems and percentages are the same only written differently 5% is .05em, 10% is .1em.