]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Change up the "justified" nav options
authorMark Otto <markdotto@gmail.com>
Fri, 23 Dec 2016 18:40:54 +0000 (10:40 -0800)
committerMark Otto <markd.otto@gmail.com>
Sat, 24 Dec 2016 22:21:04 +0000 (14:21 -0800)
Given move to flexbox, we can make this available for everyone and clean it up some.

- Simplifies the `.nav-justified` styles to build on the flex-powered `.nav` base class.

- Adds the `.nav-fill` to make nav links fill available horizontal space, but not equal width.

scss/_nav.scss

index 66d16ef061c7c548756709382491ad0b9afa9bf6..123d2b844bb6767c4a0a8bc67363dbbfb6e49b68 100644 (file)
   }
 }
 
-.nav-stacked {
+
+//
+// Justified variants
+//
+
+.nav-fill {
   .nav-item {
-    display: block;
-    float: none;
+    flex: 1 1 auto;
+    text-align: center;
+  }
+}
 
-    + .nav-item {
-      margin-top: $nav-item-margin;
-      margin-left: 0;
-    }
+.nav-justified {
+  .nav-item {
+    flex: 1 1 100%;
+    text-align: center;
   }
 }
 
 
-//
 // Tabbable tabs
 //
-
 // Hide tabbable panes to start, show them when `.active`
+
 .tab-content {
   > .tab-pane {
     display: none;
     display: block;
   }
 }
-
-
-// Justified navigation
-//
-// Justified nav components are only built for flexbox mode in Bootstrap 4. In
-// previous versions, this component variation was limited to anchor-based nav
-// implementations--meaning it couldn't be used on button elements. This is due
-// to a longstanding Safari bug in responsive table styles.
-//
-// Using flexbox, we avoid that problem altogether at the cost of no default
-// justified navigation for default Bootstrap. Sorry, y'all <3.
-
-.nav-justified {
-  display: flex;
-
-  .nav-item {
-    flex: 1;
-    text-align: center;
-  }
-}