Created
July 12, 2012 10:18
-
-
Save jem-computer/3097201 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://csswizardry.com/2012/06/single-direction-margin-declarations/ | |
=font-size($sizeValue: 1) | |
font-size: ($sizeValue * 16) + px | |
font-size: $sizeValue + rem | |
=margin-top-rem($margin: 1.6) | |
margin-top: ($margin * 16) + px | |
margin-top: $margin + 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(I try to only specify margins as bottom/right where possible. Could probably refactor this to one mixin.)