Skip to content

Instantly share code, notes, and snippets.

@ideefixe
Created February 15, 2013 18:07
Show Gist options
  • Save ideefixe/4962189 to your computer and use it in GitHub Desktop.
Save ideefixe/4962189 to your computer and use it in GitHub Desktop.
pixels to em SASS mixin
$browser-context: 16; // Default
@function em($pixels, $context: $browser-context) {
@return #{$pixels/$context}em
}
h1 {
font-size: em(36);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment