-
-
Save faridulhassan/4e3d054172d69ff87ed68c29dc38ae66 to your computer and use it in GitHub Desktop.
#sass #css-layout — Margin and Padding loop for SASS.
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
// Margins and Padding | |
// ------------------------- | |
$i: 0; | |
@while $i <= 50 { | |
.mt#{$i} { margin-top: 1px * $i; } | |
.mb#{$i} { margin-bottom: 1px * $i; } | |
.ml#{$i} { margin-left: 1px * $i; } | |
.mr#{$i} { margin-right: 1px * $i; } | |
.pt#{$i} { padding-top: 1px * $i; } | |
.pb#{$i} { padding-bottom: 1px * $i; } | |
.pl#{$i} { padding-left: 1px * $i; } | |
.pr#{$i} { padding-right: 1px * $i; } | |
$i: $i + 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment