Skip to content

Instantly share code, notes, and snippets.

@sdgluck
Last active November 4, 2015 14:37
Show Gist options
  • Save sdgluck/3fa3d86b3ec6cc2eb875 to your computer and use it in GitHub Desktop.
Save sdgluck/3fa3d86b3ec6cc2eb875 to your computer and use it in GitHub Desktop.
LESS rem font-size mixin with px fallback. Requires that html, body has font-size: 62.5% such that 1rem = 10px.
.font-size (@size) {
@px: @size * 10;
font-size: e("@{px}px");
font-size: e("@{size}rem");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment