Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
sass px to em mixin
$browser-context: 16; // Default
@function em($pixels, $context: $browser-context) {
@return #{$pixels/$context}em
body {
font-size: em(16);
p.intro {
font-size: em(24);
h1 {
font-size: em(72);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment