Skip to content

Instantly share code, notes, and snippets.

Created March 20, 2016 14:56
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save anonymous/ce7c5287e1e20619d8aa to your computer and use it in GitHub Desktop.
Save anonymous/ce7c5287e1e20619d8aa to your computer and use it in GitHub Desktop.
px to rem mixin
@function rem($pxs) {
@if type_of($pxs) == list {
$rem: ();
@each $px in $pxs {
$rem: append($rem, $px / 16 * 1rem);
}
} @else {
$rem: $pxs / 16 * 1rem;
}
@return $rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment