Skip to main content

Allow percentages for line height


Show first post

132 replies

Neil_Johnson
  • New Participant
  • 5 replies
  • May 17, 2024

This is needed. I don’t know how it released without this function. Now I have to convert to px based and when the inevitable release happens later this year I’ll have to convert them all back to % again.


neelts
  • 10 replies
  • May 20, 2024

+1 for that too, @Mark_McIntyre for the formula part you can try my new plugin for now, I made a video to show your request in action:

You can see that the variables h1-line-height, h2-line-height & h3-line-height use formulas, just like you mentioned:
{{ Math.round( $h1-size * $line-height ) }}.
So their values are automatically updated when you change the line-height or h1/h2/h3-size variables.

And of course the link to the plugin:

Figma

Hope this helps!


Denis_Obuhov

Must have feature!
Waiting for it so much!


Moon_Rat
  • New Participant
  • 6 replies
  • May 28, 2024

I know we can work around this issue by using formulas to calculate our line-height from a percentage variable and the font size in px. But this is adding so much complexity that I’d rather not use it at all for now.
Would love to get this in a new iteration of typographic variables!


  • 2 replies
  • May 29, 2024
  • 1, needed. It waste so much time to set each line height manual πŸ™‚ And the percentages are the best way in this case

  • 2 replies
  • May 29, 2024

+1, needed. It waste too much time to set each line height manual πŸ™‚ And the percentages are the best way in this case


Jaszkin-Man_Jakub

Out team also needs this! 🫡


Samantha_Lawrence

What I have never really understood about the implementation of type variables, is that the variables are set in all the sub-fields of the old type styles. What I expected was, similar to color tokens, the old type styles go away. I should have H1 as a variable, with all the settings hard-coded in it. Then I use modes in the variables palette to create necessary switches. Being able to hide type styles would be so helpful in larger systems that have component-specific type styles. I don’t need those showing up for all designers.


KennLucas
  • 220 replies
  • June 5, 2024

I found this not correct for letter spacing.

Yes, you can use a variable. But no, it does not read as a percentage.

Setting a variable β€œ10” in the letter spacing field is a much greater spread than 10 β€œPERCENT.”

The letter spacing field also should allow setting of a percent value as needed for line height.

Potentially, this would be an easy fix for Figma if they just allowed a string there.


KennLucas
  • 220 replies
  • June 5, 2024

Absolutely! I have been chasing this windmill for a bit.

I just don’t understand the value of variables when they still have to be put into manual styles anyway.

And definitely agree with the need to keep designers working and not thinking about these things.


Megan_Trimble

Hoping this update makes an appearance at Config. This would be really useful to my team!


Chris_Agi

+1 vote

Ive had to create multiple token values for each font size used to ensure we have scalability for our design system, which is a massive pain in the butt…


David.Stenbeck

Similar to branching, this is like someone who never used tokens for typography designed this. % for line height is missing, you still have to make styles instead of going towards the tokens standard. it’s so weird…

well… untill you realize β€œHey we got number and string variables… it’s cheaper to just allow them for the existing fields instead of making something good… should we do it the cheap way?”


Anyone find any solution to use % in line-height?


John_Fraskos

This is absolutely needed, line height vars are un-usable without %. Come on people.


Andreas_Nordenson

I love you Figma but im heavily disappointed the line-height percentage support wasnt announced at Config. This is a major blocker for a vast amount of teams that work with design systems.


Cristiano_Akihito1

It would be important for Figma to consider this issue and implement % in the line-height variables. I was waiting for this technical debt to be resolved in Figma config. We are waiting for this correction so that we can fully implement variables in typography.


Morten_Christensen

I completely agree. Line-height should be percentage-based, so please get this minor fix implemented asap. πŸ™‡β€β™‚οΈ


Dmitry_Lyapustin1

So no updates on this so far? It’s a blocker for typography variables setup.


Please, percentages!! πŸ™


Hiu_Chang

100000000000% needed!!


Victor_Papaleo

Please, we can’t consider using typography tokens unless we can use percentages.


Vyacheslav_Troyan

+++
Please add percentage support πŸ™


Mark_Schafer

+1 Not possible to model design system line heights without using percentages.


Paulina_Szuscik

I agree, it would be a huuuuge improvement! πŸ™ πŸ™ πŸ™


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings