Skip to main content
Question

How to setup different rem base unit size for different frame width?

  • September 29, 2023
  • 3 replies
  • 990 views

Hey, I’ve been looking for the way to change rem base unit size depending on a frame(screen) width. Currently if I change the base unit size for 1 frame, it becomes active for all the frames in the file, which breaks the point of using rem (if you design responsive interfaces)

Is there anyway to define base unit size based on breakpoints?

This topic has been closed for replies.

3 replies

Oussama_BK
  • 14 replies
  • September 29, 2023

You can use variables for this, and create multiple modes for each base unit size, then set the correspondent mode to each frame which has different breakpoints,

By that, the variables inside that frame will respect their mode.


  • Author
  • 2 replies
  • October 2, 2023

Sorry I can’t make it work. So I created a variable (type “number”) with modes

But when I try to select it for a text layer, it changes text content, not the font size


  • Author
  • 2 replies
  • October 2, 2023

So “mode 2” is 14, but instead of applying it to font size, it just replaced the text of the layer


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