Sass Mixin for Setting Font Size in Rem

June 6, 2014

Sass Mixin for Setting Font Size in Rem

Here is a Sass mixin that makes setting font size in rem easy. As a bonus, it also provides backward compatibility for IE 8 and below that do not support rem units.

The third font-weight argument is optional. If you wish, you could make line-height optional, too, but I always like to set font-size together with line-height.

Enjoy.

Comments

comments powered by Disqus