diff options
| author | Martijn Cuppens <[email protected]> | 2020-01-07 21:32:46 +0100 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-01-07 22:32:46 +0200 |
| commit | 6904afe36b80d721b581a6a13c19f0688ac46338 (patch) | |
| tree | f3671830443df0fd4a13ceff8da37376535c55d7 /scss/_navbar.scss | |
| parent | 5d1da6377df993319c77d6133eafd09a1c956990 (diff) | |
| download | bootstrap-6904afe36b80d721b581a6a13c19f0688ac46338.tar.xz bootstrap-6904afe36b80d721b581a6a13c19f0688ac46338.zip | |
Inherit flex-wrap to decrease generated css (#29951)
Diffstat (limited to 'scss/_navbar.scss')
| -rw-r--r-- | scss/_navbar.scss | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/scss/_navbar.scss b/scss/_navbar.scss index 5e777a363..3118a2eb0 100644 --- a/scss/_navbar.scss +++ b/scss/_navbar.scss @@ -27,15 +27,16 @@ // Because flex properties aren't inherited, we need to redeclare these first // few properties so that content nested within behave properly. + // The `flex-wrap` property is inherited to simplify the expanded navbars %container-flex-properties { display: flex; - flex-wrap: wrap; + flex-wrap: inherit; align-items: center; justify-content: space-between; } - .container, - .container-fluid { + > .container, + > .container-fluid { @extend %container-flex-properties; } @@ -148,7 +149,7 @@ &#{$infix} { @include media-breakpoint-up($next) { - flex-flow: row nowrap; + flex-wrap: nowrap; justify-content: flex-start; .navbar-nav { @@ -164,22 +165,6 @@ } } - // For nesting containers, have to redeclare for alignment purposes - %container-nesting-#{$breakpoint} { - flex-wrap: nowrap; - } - - > .container, - > .container-fluid { - @extend %container-nesting-#{$breakpoint}; - } - - @each $size, $container-max-width in $container-max-widths { - > .container#{breakpoint-infix($size, $container-max-widths)} { - @extend %container-nesting-#{$breakpoint}; - } - } - .navbar-collapse { display: flex !important; // stylelint-disable-line declaration-no-important |
