Skip to content

Instantly share code, notes, and snippets.

@rochabianca
Created December 5, 2018 20:54
Show Gist options
  • Save rochabianca/7d56b106864c6752e0611961ec0909f8 to your computer and use it in GitHub Desktop.
Save rochabianca/7d56b106864c6752e0611961ec0909f8 to your computer and use it in GitHub Desktop.
// $pixel - number to be converted on em
// $context: font-size base (most browsers use 16px)
@function em($pixel, $context: 16) {
@return $pixel / $context + em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment