]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Inherit flex-wrap to decrease generated css (#29951)
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Tue, 7 Jan 2020 20:32:46 +0000 (21:32 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 7 Jan 2020 20:32:46 +0000 (22:32 +0200)
scss/_navbar.scss

index 5e777a3637a2d0ba474ea75c92f527d91f3f0933..3118a2eb0a42d8dd607c777442e878314351eb08 100644 (file)
 
   // 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;
   }
 
 
     &#{$infix} {
       @include media-breakpoint-up($next) {
-        flex-flow: row nowrap;
+        flex-wrap: nowrap;
         justify-content: flex-start;
 
         .navbar-nav {
           }
         }
 
-        // 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