mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Reorganize utilities into more separate files under a /scss/utilities/
directory
[skip sauce] [skip validator]
This commit is contained in:
39
scss/utilities/_spacing.scss
Normal file
39
scss/utilities/_spacing.scss
Normal file
@@ -0,0 +1,39 @@
|
||||
// Margin and Padding
|
||||
|
||||
.m-x-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
|
||||
@each $prop, $abbrev in (margin: m, padding: p) {
|
||||
@each $size, $lengths in $spacers {
|
||||
$length-x: map-get($lengths, x);
|
||||
$length-y: map-get($lengths, y);
|
||||
|
||||
.#{$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; }
|
||||
|
||||
// Axes
|
||||
.#{$abbrev}-x-#{$size} {
|
||||
#{$prop}-right: $length-x !important;
|
||||
#{$prop}-left: $length-x !important;
|
||||
}
|
||||
.#{$abbrev}-y-#{$size} {
|
||||
#{$prop}-top: $length-y !important;
|
||||
#{$prop}-bottom: $length-y !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Positioning
|
||||
|
||||
.pos-f-t {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-navbar-fixed;
|
||||
}
|
Reference in New Issue
Block a user