grafana/public/sass/utils/_spacings.scss

50 lines
1.0 KiB
SCSS
Raw Normal View History

2016-02-16 07:39:45 -06:00
// Margin and Padding
.m-x-auto {
margin-right: auto !important;
2017-12-19 09:22:41 -06:00
margin-left: auto !important;
2016-02-16 07:39:45 -06:00
}
@each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $lengths in $spacers {
2017-12-19 09:22:41 -06:00
$length-x: map-get($lengths, x);
$length-y: map-get($lengths, y);
2016-02-16 07:39:45 -06:00
2017-12-19 09:22:41 -06:00
.#{$abbrev}-a-#{$size} {
#{$prop}: $length-y $length-x !important;
} // a = All sides
.#{$abbrev}-t-#{$size} {
#{$prop}-top: $length-y !important;
}
.#{$abbrev}-r-#{$size} {
#{$prop}-right: $length-x !important;
}
.#{$abbrev}-b-#{$size} {
#{$prop}-bottom: $length-y !important;
}
.#{$abbrev}-l-#{$size} {
#{$prop}-left: $length-x !important;
}
2016-02-16 07:39:45 -06:00
// Axes
.#{$abbrev}-x-#{$size} {
2017-12-19 09:22:41 -06:00
#{$prop}-right: $length-x !important;
#{$prop}-left: $length-x !important;
2016-02-16 07:39:45 -06:00
}
.#{$abbrev}-y-#{$size} {
2017-12-19 09:22:41 -06:00
#{$prop}-top: $length-y !important;
2016-02-16 07:39:45 -06:00
#{$prop}-bottom: $length-y !important;
}
}
}
// Positioning
.pos-f-t {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: $zindex-navbar-fixed;
}