Skip to content

Instantly share code, notes, and snippets.

@fieldoffice
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save fieldoffice/9137575 to your computer and use it in GitHub Desktop.

Select an option

Save fieldoffice/9137575 to your computer and use it in GitHub Desktop.
SCSS Pixel to REM conversion with px fallback for older browsers
@mixin font-size($size, $base:16) {
font-size: $size + px;
font-size: $size/$base * 1rem;
}
@include font-size(32);
p {
font-size: 32px;
font-size: 2rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment