selfprivacy.org/_vendor/github.com/google/docsy/assets/scss/rtl/_spacing.scss

88 lines
2.1 KiB
SCSS
Raw Normal View History

2024-04-21 23:04:16 +00:00
@each $breakpoint in map-keys($grid-breakpoints) {
2024-04-25 22:15:39 +00:00
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $length in $spacers {
.#{$abbrev}#{$infix}-#{$size} {
#{$prop}: $length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
.#{$abbrev}t#{$infix}-#{$size},
.#{$abbrev}y#{$infix}-#{$size} {
#{$prop}-top: $length !important;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
.#{$abbrev}r#{$infix}-#{$size},
.#{$abbrev}x#{$infix}-#{$size} {
#{$prop}-inline-end: $length !important;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
.#{$abbrev}b#{$infix}-#{$size},
.#{$abbrev}y#{$infix}-#{$size} {
#{$prop}-bottom: $length !important;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
.#{$abbrev}l#{$infix}-#{$size},
.#{$abbrev}x#{$infix}-#{$size} {
#{$prop}-inline-start: $length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
}
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
// Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`)
@each $size, $length in $spacers {
@if $size !=0 {
.m#{$infix}-n#{$size} {
margin: -$length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
.mt#{$infix}-n#{$size},
.my#{$infix}-n#{$size} {
margin-top: -$length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
.mr#{$infix}-n#{$size},
.mx#{$infix}-n#{$size} {
margin-right: -$length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
.mb#{$infix}-n#{$size},
.my#{$infix}-n#{$size} {
margin-bottom: -$length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
.ml#{$infix}-n#{$size},
.mx#{$infix}-n#{$size} {
margin-left: -$length !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
}
}
// Some special margin utils
.m#{$infix}-auto {
margin: auto !important;
}
.mt#{$infix}-auto,
.my#{$infix}-auto {
margin-top: auto !important;
}
.mr#{$infix}-auto,
.mx#{$infix}-auto {
margin-right: auto !important;
}
.mb#{$infix}-auto,
.my#{$infix}-auto {
margin-bottom: auto !important;
}
.ml#{$infix}-auto,
.mx#{$infix}-auto {
margin-left: auto !important;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
}
}