CSS-NibblePoker/scss/core/spacing/axis.scss

40 lines
1.7 KiB
SCSS
Raw Normal View History

// NibblePoker CSS Theme - CC0 1.0 (Public Domain)
/* Utilities > Spacing > Sided */
@mixin axis-spacing-maker($type-key, $type-property, $size-key, $size-value) {
.#{$type-key}x-#{$size-key} {
#{$type-property}-left: #{$size-value};
#{$type-property}-right: #{$size-value};
}
.#{$type-key}y-#{$size-key} {
#{$type-property}-top: #{$size-value};
#{$type-property}-bottom: #{$size-value};
}
}
/* Utilities > Spacing > Sided > Variable Sizes */
@include axis-spacing-maker("m", "margin", "xxs", calc(#{$margin-base-size} * 0.25));
@include axis-spacing-maker("m", "margin", "xs", calc(#{$margin-base-size} * 0.5));
@include axis-spacing-maker("m", "margin", "s", calc(#{$margin-base-size} * 0.75));
@include axis-spacing-maker("m", "margin", "m", #{$margin-base-size});
@include axis-spacing-maker("m", "margin", "l", calc(#{$margin-base-size} * 1.5));
@include axis-spacing-maker("m", "margin", "xl", calc(#{$margin-base-size} * 2.0));
@include axis-spacing-maker("p", "padding", "xxs", calc(#{$margin-base-size} * 0.25));
@include axis-spacing-maker("p", "padding", "xs", calc(#{$margin-base-size} * 0.5));
@include axis-spacing-maker("p", "padding", "s", calc(#{$margin-base-size} * 0.75));
@include axis-spacing-maker("p", "padding", "m", #{$margin-base-size});
@include axis-spacing-maker("p", "padding", "l", calc(#{$margin-base-size} * 1.5));
@include axis-spacing-maker("p", "padding", "xl", calc(#{$margin-base-size} * 2.0));
/* Utilities > Spacing > Sided > Fixed Sizes */
@include axis-spacing-maker("m", "margin", "0", 0);
@include axis-spacing-maker("p", "padding", "0", 0);
/* Utilities > Spacing > Sided > Others */
@include axis-spacing-maker("m", "margin", "auto", auto);
@include axis-spacing-maker("p", "padding", "auto", auto);