Skip to content

Instantly share code, notes, and snippets.

@machal
Created July 9, 2012 13:34
Show Gist options
  • Select an option

  • Save machal/3076599 to your computer and use it in GitHub Desktop.

Select an option

Save machal/3076599 to your computer and use it in GitHub Desktop.
LESS: Font size in rem unit with fallback to pixels
// Nastaveni velikosti pisma v rem s fallbackem v px
// Zdroj: http://www.stuffandnonsense.co.uk/blog/about/less
@baseFontSize: 15;
.font-size(@font-size: @baseFontSize) {
@rem: (@font-size / @baseFontSize);
font-size: @font-size * 1px;
font-size: ~"@{rem}rem";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment