Skip to main content
Mark_McIntyre
New Participant
April 17, 2024

Allow percentages for line height

  • April 17, 2024
  • 197 replies
  • 25151 views

Firstly great job Figma Font variables are here!!!

The only thing missing is the use of percentages in the line-height property.

You can not use a percentage in the line-height as it only accepts variables that are a number type.

Although the variables for line-height caters for pixel (absolute) line-heights (10,12,14)- it does not accommodate relative line heights.

In other words you can’t use percentage variables for line heights that are a percentage of the font size (100%, 120%,150%).

Interestingly …You can use a variable for letter-spacing ( which accepts a number variable - but reads it as a percentage) - the challenge remains that line heights by default are absolute not percentages - even though you can input a percentage.

Percentages allow greater flexibility and less calculations

Word around would be to allow formula in a variable
e.g. =[variable] * 1.5

Or figuring out a way for the line height to be toggle between absolute or relative application of the number variable.

197 replies

KennLucas
November 21, 2024

Yeah, at that point you are hurting yourself.

Just use a percentage value in the style and save the headache. Too much chance for error and waste of time maintaining tons of excess variables.

Until that works properly and supports percentage in the variable, my team has better things to do.

KennLucas
November 21, 2024

That is the same thing as just typing in a text value.

Sure, IF there was some way that the variable would apply your equation to the actual style setting field, then yes.

But here all you are doing is typing in a math problem.

You still have the same issue…you have a fixed value to update in each and every line height variable if you ever change the font size variable.

It would be fine IF the equation could be advanced enough to use the font size variable in the math probelm so it did not have to be manually manipulated in every lineheight variable.

Alex_Nelson
December 2, 2024

Definitely need this.

Herb
December 18, 2024

Needed now now now now now

December 18, 2024

Currently working on a design system. It’s sad that this is not implemented yet. Makes me wonder how to contain line height in a variable that makes sense for our code department as well.

mrthink
New Participant
January 24, 2025

Year 2025, it’s not implemented yet.

Hannu
New Participant
January 28, 2025

Jumping on the bandwagon: we DEFINITELY need % -based line-height variables. This is like the n:o 1 use case I would have for these.

Sam_Baldwin1
New Member
February 2, 2025

+1!

PeterV
New Member
February 4, 2025

Very much needed. We have to work around this, which is quite frustrating.

Shiv
New Participant
February 6, 2025

 

Interestingly …You can use a variable for letter-spacing ( which accepts a number variable - but reads it as a percentage)

Just wanted to jump in here and say that this, at least at the time of writing, this statement is inaccurate. The default behavior for letter spacing defaults to px and not percentage. If you detach the variable in the type panel, you’ll see the unit default to px instead of %.

Detaching -2 shows unit default to px