Skip to content

Instantly share code, notes, and snippets.

@beneverard
Created October 4, 2012 16:19
Show Gist options
  • Save beneverard/3834707 to your computer and use it in GitHub Desktop.
Save beneverard/3834707 to your computer and use it in GitHub Desktop.
LESS .font-size mixin
.font-size(@font-size: 16) {
@rem: (@font-size / 16);
font-size: @font-size * 1px;
font-size: ~"@{rem}rem";
}
/* usage */
a {
.font-size(16); // 16px
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment