Sass Units Translate
Easily convert units with Sass.
0. Install
npm install sass-units-translate --save-dev
Import into your stylesheet.
1. Set global base font size.
// Setup base font size // @include sut-core-set-base(100%); // @include sut-core-set-base(1em); // @include sut-core-set-base(1);
Note: This is only setting a global variable and will not output any CSS.
2. Translate
Simple
Convert to em, rem, percent, relative and px.
h1
Simple Multiple
h1
With Base Sizes
Convert from em, rem, percent, relative and px.
h1