Skip to main content

Add REM as a unit of measurement

  • October 3, 2024
  • 7 replies
  • 3489 views

Arin_Tamimi

Please include REM as a mode of measurement as it is becoming more and more used by developers. Having to manually convert the measurement is so tedious.

7 replies

leigh_van_maaren

The conversion is also just never right because of the nature of REM - I’ve had to accept that my font sizes are basically going to end up being vibes-based when implemented for our REM-based product.


Jeroen2
  • Active Member
  • 26 replies
  • October 3, 2024

rem and em are relative units. I find it an interesting proposal, as it shifts the way we might think of Frames. Say we define a base font size to be referred to as 1em for a frame, then rem could be calculated based on the 1rem definition of that frame.

Mind you, in web, theoretically, you can get calculation upon calculation upon calculation. If you are unaware of this, things might get foggy (“I used 0.5em, why is everything so small??”). This is due to the relative nature of rem. If support for rem should happen (I would very much like it), we should be able to review the computed value as well, just like we can with DevTools. Otherwise, you might get lost in complexity. Especially when you are in a design workflow.

Having said that, I like the idea. It just needs some extra UX thought to make it work.


Damian_Oczki
  • Active Member
  • 28 replies
  • October 3, 2024

Fully agreed. Font size and other font properties should be defined in rem or em, never in px, if you want your product to be accessible.

A visitor’s browser can be configured to use a root font size other than 16 px, and so all fonts should scale with that. Other properties may scale with root font size as well, but that’s up to the designer to decide - e.g. borders should not scale (so use px), but some distances should (so use rem/em).

If Figma allowed the use of rem and em, there should also be a slider to easily emulate the change in root font size. This way, designers would have an easy way to preview how the layout behaves (or even breaks) when a person with vision impairments tries to use their product.

Here’s a mockup how it could look like in collapsed state:

And here’s with the Root font size panel open:


djv
Figmate
  • Community Support
  • 4943 replies
  • October 7, 2024

Hey All, thanks for the feedback!

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


Zoltan Albert
dvaliao wrote:

Hey All, thanks for the feedback!

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

Just saying in regards to supporting rems… “it’d be a lot cooler if you did.”


Jacqueline Vujica

Rem conversion feature would make the collab with devs so much easier! 
Input for me to define 1rem base value and then devs can see converted px to rems in dev mode. Hope we have this in Figma soon!


Philipp_Jeroma1

Also from a design system perspective it is weird for not being able to being on par with a rem based size system in design tokens. 


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