You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
$plain-ui__spacing-direction: (
|
|
'top',
|
|
'bottom',
|
|
'left',
|
|
'right'
|
|
) !default;
|
|
|
|
$plain-ui__helpers__spacing-gap: 0.25 !default;
|
|
$plain-ui__helpers__spacing-steps: 10 !default;
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
@mixin spacing($class, $style, $direction, $name, $value, $breakpoints: 0)
|
|
{
|
|
.#{$class}-#{$direction}-#{$name} {
|
|
#{$style}-#{$direction}: $value;
|
|
}
|
|
}
|
|
|
|
@each $direction in $plain-ui__spacing-direction {
|
|
|
|
@include spacing('m', 'margin', $direction, 0, 0);
|
|
@include spacing('m', 'margin', $direction, 1, 1px);
|
|
|
|
@for $i from 2 through $plain-ui__helpers__spacing-steps {
|
|
$value: $plain-ui__helpers__spacing-gap * factor($i - 1) * 1rem;
|
|
@include spacing('m', 'margin', $direction, $i, $value);
|
|
}
|
|
}
|
|
|
|
@each $direction in $plain-ui__spacing-direction {
|
|
|
|
@include spacing('p', 'padding', $direction, 0, 0);
|
|
@include spacing('p', 'padding', $direction, 1, 1px);
|
|
|
|
@for $i from 0 through $plain-ui__helpers__spacing-steps {
|
|
$value: $plain-ui__helpers__spacing-gap * factor($i - 1) * 1rem;
|
|
@include spacing('p', 'padding', $direction, $i, $value);
|
|
}
|
|
} |