Created
March 26, 2020 06:31
-
-
Save aslamdoctor/2d058468f848ba8ce017cb49da457130 to your computer and use it in GitHub Desktop.
Sass Margin / Padding Helper
This file contains 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
// 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