From 6e618306333dd7c3f5f035d53e9403553be75ad1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 21 Dec 2016 21:03:02 -0800 Subject: [PATCH] update justified nav to use justified navbar; remove safari bug warning given flexbox implementation --- docs/examples/justified-nav/index.html | 48 ++++++++--- docs/examples/justified-nav/justified-nav.css | 81 ++----------------- 2 files changed, 42 insertions(+), 87 deletions(-) diff --git a/docs/examples/justified-nav/index.html b/docs/examples/justified-nav/index.html index a757a5c9a8..73c4435279 100644 --- a/docs/examples/justified-nav/index.html +++ b/docs/examples/justified-nav/index.html @@ -22,19 +22,38 @@
-

Project name

-
@@ -48,8 +67,7 @@
-

Safari bug warning!

-

As of v9.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.

+

Heading

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

View details »

@@ -76,6 +94,10 @@ + + + + diff --git a/docs/examples/justified-nav/justified-nav.css b/docs/examples/justified-nav/justified-nav.css index bd28e271e3..fdec2a4334 100644 --- a/docs/examples/justified-nav/justified-nav.css +++ b/docs/examples/justified-nav/justified-nav.css @@ -19,85 +19,18 @@ body { font-size: 21px; } -/* add .nav-justified, see: https://github.com/twbs/bootstrap/issues/18653 */ -.nav-justified { - width: 100%; -} -.nav-item { - float: none; -} -.nav-link { - width: 100%; - margin-bottom: 5px; - text-align: center; +.navbar { + background-image: linear-gradient(to bottom, #f7f7f7 0%,#eee 100%); + border: 1px solid #e5e5e5; } @media (min-width: 768px) { - .nav-item { - display: table-cell; - width: 1%; + .navbar-nav { + display: flex; } - .nav-link { - margin-bottom: 0; - } -} -/* Customize the nav-justified links to be fill the entire space of the .navbar */ - -.nav-justified { - background-color: #eee; - border: 1px solid #ccc; - border-radius: 5px; -} -.nav-link { - padding-top: 15px; - padding-bottom: 15px; - margin-bottom: 0; - font-weight: bold; - color: #777; - text-align: center; - background-color: #e5e5e5; /* Old browsers */ - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5),to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); - background-image: linear-gradient(to bottom, #f5f5f5 0%,#e5e5e5 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */ - background-repeat: repeat-x; /* Repeat the gradient */ - border-bottom: 1px solid #d5d5d5; -} -.nav-link.active, -.nav-link.active:hover, -.nav-link.active:focus { - background-color: #ddd; - background-image: none; - -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.15); - box-shadow: inset 0 3px 7px rgba(0,0,0,.15); -} -.nav-item:first-child .nav-link { - border-radius: 5px 5px 0 0; -} -.nav-item:last-child .nav-link { - border-radius: 0 0 5px 5px; -} - -@media (min-width: 768px) { - .nav-justified { - max-height: 52px; - } - .nav-link { - border-right: 1px solid #d5d5d5; - border-left: 1px solid #fff; - } - .nav-item:first-child .nav-link { - border-left: 0; - border-radius: 5px 0 0 5px; - } - .nav-item:last-child .nav-link { - border-right: 0; - border-radius: 0 5px 5px 0; + .navbar-nav .nav-item { + flex: 1 0 auto; } }