Skip to main content
Peiran_Tan
February 9, 2021

Support for relative size units (vw, vh &c)?

  • February 9, 2021
  • 26 replies
  • 17102 views

Is there a plan for Figma to support relative font size units, such as vw, vh, vmin, vmax, etc.? The design system I’m working at is trying to add fluid font size calculations to bigger title sizes, and Figma’s native support for these units would be extremely helpful.

I’m also working separately on a plugin that converts inputed relative units to px values, but it seems Figma’s API won’t support background-running plugins that observes text layer changes. Any thoughts on making the plugin more useful?

26 replies

Gleb
Power Member
February 9, 2021

There is no way to do that, so feel free to change your topic to a feature suggestion and move it into #product-ideas or just create a new topic there.

madmonkey
February 10, 2021

Seems like the plugin linked below is your solution.

  • Text Resizer helps you update your designs quickly and flexibly with respect to the base font size defined for 1rem …
Figma

Hmmm, wait a moment, maybe you mean fluid resizing font relative to the container size. I haven’s seen support for this in html/css either, so doubt it will be possible in Figma. I may be wrong.

Peiran_Tan
February 10, 2021

The vw, vh, vmin, vmax units define font sizes in relation to their viewport sizes. For example, if the viewport width is 1600px, 1vw equals 1600/100 = 16px.

Jc_Martel
March 31, 2021

+1 - I do have the same issue. I would love to have a better auto-scale (fluid) fonctionality in Figma… and not just fonts, but padding, containers, border-radius, etc.

I would add that being able to set a base px value equal to 1em and then use ems/rems when designing, we could save a lot of time not having to redesign in for all screen sizes. It would be nearer what a developer would have to build.

Imagine setting this is your design library and make it work for anything you build.,.ahhhh, a dream.

Neil_Roose
New Participant
September 11, 2021

+1. This is a badly needed feature. Why have to leave it to the developer to calculate these things?

Timea
October 13, 2021

Agree, it would help a lot! Designing with pixels and coding with relative units creates a big disconnect between design and engineering, and makes at least one of these teams’ life harder.

Matteo_S.L
January 16, 2022

+1 this, fluid font size

Nic2
March 9, 2022

Hi, I ran into the same problem. I got tired of doing it manually, so I wrote a python script that converts px to vw or vh and saves it as a new file . You can find it on GitHub at nicstephens/pxtovw

XavierV
Active Member
August 25, 2022

Yes relative size would be very usefull.

April 11, 2023

Would love to set sizes based on rem’s, vw’s or grid %'s. Text block 70% of div.