Skip to content

Instantly share code, notes, and snippets.

@iambacon
Created June 4, 2014 13:41
Show Gist options
  • Save iambacon/3eb09758f485e068440b to your computer and use it in GitHub Desktop.
Save iambacon/3eb09758f485e068440b to your computer and use it in GitHub Desktop.
@base--line-height: 1.2;
@base--font-size: 16px;
.font-size(@font-size; @line-height) when(@line-height = true){
line-height: ceil(@font-size / @base--line-height) * (@base--line-height / @font-size);
.font-size(@font-size);
}
.font-size(@font-size; @line-height:false) {
font-size: @font-size;
font-size: (@font-size / @base--font-size) * 1rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment