Px vs Ems vs Rems vs Percents vs *explodes*

7 years ago from Matt Felten, Design System Lead at YouCaring

  • Jesse DobbelaereJesse Dobbelaere, 7 years ago (edited 7 years ago )

    I mostly use some lightweight Sass mixins where you can specify the text dimensions like font-size, line-height, margins, paddings. It then generates the CSS with rem's and a px fallback (uncomment the highlighted lines).

    Oh and it calculates the values according to the baseline that you've configured in the settings file. And you can also use a modular scale :-) This is the official Chopstick website

    0 points
    • Matt FeltenMatt Felten, 7 years ago

      Yeah, I have a couple different pixels-to-rem Sass mixins lying around that I might use. I just want to make sure there's not some better method out there that I haven't ran across.

      I've never seen Chopstick before. Thanks for the link.

      0 points