Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sass Margin / Padding Helper
// Variables
$spacing-top:160px;
$spacing-bottom:160px;
// Mixins
@mixin paddings($top:$spacing-top, $bottom:$spacing-bottom){
padding-top:$top;
padding-bottom:$bottom;
}
@mixin margins($top:$spacing-top, $bottom:$spacing-bottom){
margin-top:$top;
margin-bottom:$bottom;
}
// Usage
@include paddings();
@include margins();
@include paddings($top:20px);
@include margins($bottom:20px);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.