|
|
|
@ -1,3 +1,11 @@
|
|
|
|
|
/**
|
|
|
|
|
* Spacing
|
|
|
|
|
*
|
|
|
|
|
* creates margin and padding for each direction and for each breakpont
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$plain-ui__spacing-direction: (
|
|
|
|
|
'top',
|
|
|
|
|
'bottom',
|
|
|
|
@ -8,6 +16,46 @@ $plain-ui__spacing-direction: (
|
|
|
|
|
$plain-ui__spacing-gap: 0.25 !default;
|
|
|
|
|
$plain-ui__spacing-steps: 10 !default;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* mixin: spacing for single padding or margin
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
@mixin spacing($class, $style, $direction, $name, $value)
|
|
|
|
|
{
|
|
|
|
|
.#{$class}-#{$direction}-#{$name} {
|
|
|
|
|
#{$style}-#{$direction}: $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* mixin: spacing for each breakpoint
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
@mixin spacing_breakpoints($class, $style, $direction, $i, $value)
|
|
|
|
|
{
|
|
|
|
|
@include plain-ui__media-xs() {
|
|
|
|
|
@include spacing($class, $style, $direction, 'xs-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-sm() {
|
|
|
|
|
@include spacing($class, $style, $direction, 'sm-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-md() {
|
|
|
|
|
@include spacing($class, $style, $direction, 'md-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-lg() {
|
|
|
|
|
@include spacing($class, $style, $direction, 'lg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-xlg() {
|
|
|
|
|
@include spacing($class, $style, $direction, 'xlg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
@ -22,22 +70,15 @@ $plain-ui__spacing-steps: 10 !default;
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.marginless-last-child {
|
|
|
|
|
.m-top-last-child-0 {
|
|
|
|
|
> *:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* spacing for single padding or margin
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
@mixin spacing($class, $style, $direction, $name, $value)
|
|
|
|
|
{
|
|
|
|
|
.#{$class}-#{$direction}-#{$name} {
|
|
|
|
|
#{$style}-#{$direction}: $value;
|
|
|
|
|
.m-bottom-last-child-0 {
|
|
|
|
|
> *:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -49,26 +90,7 @@ $plain-ui__spacing-steps: 10 !default;
|
|
|
|
|
@for $i from 2 through $plain-ui__spacing-steps {
|
|
|
|
|
$value: $plain-ui__spacing-gap * factor($i - 1) * 1rem;
|
|
|
|
|
@include spacing('m', 'margin', $direction, $i, $value);
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-xs() {
|
|
|
|
|
@include spacing('m', 'margin', $direction, 'xs-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-sm() {
|
|
|
|
|
@include spacing('m', 'margin', $direction, 'sm-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-md() {
|
|
|
|
|
@include spacing('m', 'margin', $direction, 'md-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-lg() {
|
|
|
|
|
@include spacing('m', 'margin', $direction, 'lg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-xlg() {
|
|
|
|
|
@include spacing('m', 'margin', $direction, 'xlg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
@include spacing_breakpoints('m', 'margin', $direction, $i, $value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -80,25 +102,6 @@ $plain-ui__spacing-steps: 10 !default;
|
|
|
|
|
@for $i from 0 through $plain-ui__spacing-steps {
|
|
|
|
|
$value: $plain-ui__spacing-gap * factor($i - 1) * 1rem;
|
|
|
|
|
@include spacing('p', 'padding', $direction, $i, $value);
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-xs() {
|
|
|
|
|
@include spacing('p', 'padding', $direction, 'xs-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-sm() {
|
|
|
|
|
@include spacing('p', 'padding', $direction, 'sm-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-md() {
|
|
|
|
|
@include spacing('p', 'padding', $direction, 'md-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-lg() {
|
|
|
|
|
@include spacing('p', 'padding', $direction, 'lg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include plain-ui__media-xlg() {
|
|
|
|
|
@include spacing('p', 'padding', $direction, 'xlg-' + $i, $value);
|
|
|
|
|
}
|
|
|
|
|
@include spacing_breakpoints('p', 'padding', $direction, $i, $value);
|
|
|
|
|
}
|
|
|
|
|
}
|