| 1 |
.is-marginless |
| 2 |
margin: 0 !important |
| 3 |
|
| 4 |
.is-paddingless |
| 5 |
padding: 0 !important |
| 6 |
|
| 7 |
$spacing-shortcuts: ("margin": "m", "padding": "p") !default |
| 8 |
$spacing-directions: ("top": "t", "right": "r", "bottom": "b", "left": "l") !default |
| 9 |
$spacing-horizontal: "x" !default |
| 10 |
$spacing-vertical: "y" !default |
| 11 |
$spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "auto": auto) !default |
| 12 |
|
| 13 |
@each $property, $shortcut in $spacing-shortcuts |
| 14 |
@each $name, $value in $spacing-values |
| 15 |
// All directions |
| 16 |
.#{$shortcut}-#{$name} |
| 17 |
#{$property}: $value !important |
| 18 |
// Cardinal directions |
| 19 |
@each $direction, $suffix in $spacing-directions |
| 20 |
.#{$shortcut}#{$suffix}-#{$name} |
| 21 |
#{$property}-#{$direction}: $value !important |
| 22 |
// Horizontal axis |
| 23 |
@if $spacing-horizontal != null |
| 24 |
.#{$shortcut}#{$spacing-horizontal}-#{$name} |
| 25 |
#{$property}-left: $value !important |
| 26 |
#{$property}-right: $value !important |
| 27 |
// Vertical axis |
| 28 |
@if $spacing-vertical != null |
| 29 |
.#{$shortcut}#{$spacing-vertical}-#{$name} |
| 30 |
#{$property}-top: $value !important |
| 31 |
#{$property}-bottom: $value !important |