Skip to content

Instantly share code, notes, and snippets.

@himynameisdave
Created November 27, 2014 04:35
Show Gist options
  • Save himynameisdave/166658e79127fd80c6d4 to your computer and use it in GitHub Desktop.
Save himynameisdave/166658e79127fd80c6d4 to your computer and use it in GitHub Desktop.
Trying to make a mixin that verbosifies a shorthand margin property.
/*
Verbose Margin:
returns a margin value in 'long form',
also alphabatized (breaking the t-r-b-l rule).
Expects paramaters like normal (i.e: 'margin: 1px 2px 3px 4px = .vmar(1px, 2px, 3px, 4px)')
*/
.vmar(@mt, @mr, @mb, @ml ){
margin-bottom: @mb;
margin-left: @ml;
margin-right: @mr;
margin-top: @mt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment