Skip to main content
Mark_McIntyre
New Participant
Apr 17, 2024 10:09 AM UTC

Allow percentages for line height

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.

198 replies

Jonathan_Zazula
Apr 17, 2024 12:42 PM UTC

Is there a way to use % based line heights with Figma variables?

Patrick_Sobrak-Seaton
Apr 17, 2024 1:26 PM UTC

Seconded! This would be very helpful!

Seth_Bowers
Apr 17, 2024 3:31 PM UTC

1000% Second! - best practice on the code side is unitless numbers. Which we translate to percent in Figma. (1.5 = 150%)

Christian_Klose
New Participant
Apr 17, 2024 3:45 PM UTC

I just asked myself the exact same question. It seems that it does not work - very sad!

Equinusocio
Apr 17, 2024 4:52 PM UTC

The native typography variable has different issues that make it another half-implemented feature.

  • We can’t use variables inside line-height since we can’t use % values (only numeric variables work on that field, so no % allowed)
  • Another big issue for us is that we can’t hide typography values inside other non-typography-related fields. Or, in other words, we can’t show typography variables only for text’s fields since the option is not present inside the list:
    CleanShot 2024-04-17 at 18.52.39
Barry_McMillan3
New Member
Apr 17, 2024 10:27 PM UTC

Agreed, we need percentage based line-height

lukeratc
Apr 18, 2024 9:32 AM UTC

+1 from me for percentages and for enabling formula.

pietrogregorini
New Participant
Apr 18, 2024 9:58 AM UTC

I totally agree, using a single number is neither used in code, most of the time it translates in 1.5 for example.

Marcus_Scheller
Apr 18, 2024 11:43 AM UTC

Much needed.

Kenneth_vest_Knudsen
New Member
Apr 18, 2024 12:35 PM UTC

+1 (million) from me! once i read the news i expected this to be shipped with % support