TelegramPWA/src/styles/_spacing.scss
Alexander Zinchuk 5aa591eab5 [Dev] Introduce stylelint (#1706)
Co-authored-by: Alexander Zinchuk <alx.zinchuk@gmail.com>
Co-authored-by: Anton Korenskoy <anton@korenskoy.ru>
2022-02-11 15:13:07 +01:00

42 lines
837 B
SCSS

@use "sass:map";
$spacer: 1rem !default;
$spacers: () !default;
$spacers: map.merge(
(
0: 0,
1: ($spacer * .25),
2: ($spacer * .5),
3: $spacer,
4: ($spacer * 1.5),
5: ($spacer * 2),
6: ($spacer * 3),
),
$spacers
);
// Margin and Padding
@each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $length in $spacers {
.#{$abbrev}-#{$size} { #{$prop}: $length !important; }
.#{$abbrev}t-#{$size},
.#{$abbrev}y-#{$size} {
#{$prop}-top: $length !important;
}
.#{$abbrev}r-#{$size},
.#{$abbrev}x-#{$size} {
#{$prop}-right: $length !important;
}
.#{$abbrev}b-#{$size},
.#{$abbrev}y-#{$size} {
#{$prop}-bottom: $length !important;
}
.#{$abbrev}l-#{$size},
.#{$abbrev}x-#{$size} {
#{$prop}-left: $length !important;
}
}
}