Skip to content

Instantly share code, notes, and snippets.

@jemgold
Created June 28, 2012 13:50
Show Gist options
  • Save jemgold/3011502 to your computer and use it in GitHub Desktop.
Save jemgold/3011502 to your computer and use it in GitHub Desktop.
// http://csswizardry.com/2012/06/single-direction-margin-declarations/
=font-size($sizeValue: 1)
font-size: ($sizeValue * 16) + px
font-size: $sizeValue + rem
=margin-right-rem($margin: 1.6)
margin-right: ($margin * 16) + px
margin-right: $margin + rem
=margin-bottom-rem($margin: 1.6)
margin-bottom: ($margin * 16) + px
margin-bottom: $margin + rem
@jemgold
Copy link
Author

jemgold commented Jun 28, 2012

TODO: rewrite margin mixins to accept 4 parameters

@jemgold
Copy link
Author

jemgold commented Jun 28, 2012

TODO: replace * 16 with * $baseFontSize (wasn't working with the way our assets were being precompiled for some reason)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment