1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 05:03:16 +02:00

Refactor navbars to simplify things

* `.navbar-brand` is no longer centered, thus removing need for
max-width and a few lines of code
* Clear floats of `.navbar-brand` in the `.nav-collapse` like we did in
2.x, thus simplifying some clearing and other things.
* Restyle the `.navbar-toggle` button to align it's bars up with the
text and flow of the document.
* Restyle the `.navbar-brand` to not use padding on left/right as to
avoid negative margin and other fuckery. This limits the ability to put
a bg color on the brand, but I think that's fine for now.
This commit is contained in:
Mark Otto
2013-08-11 19:06:26 -07:00
parent c2cfd3153b
commit ba8026e00f
3 changed files with 14 additions and 39 deletions

View File

@@ -2829,10 +2829,6 @@ button.close {
clear: both;
}
.navbar-nav {
margin-bottom: 15px;
}
.navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
@@ -2889,6 +2885,7 @@ button.close {
.nav-collapse {
padding-bottom: 15px;
clear: both;
}
.nav-collapse:before,
@@ -2926,16 +2923,12 @@ button.close {
}
.navbar-brand {
display: block;
max-width: 200px;
padding: 15px 15px;
margin-right: auto;
margin-left: auto;
float: left;
padding-top: 15px;
padding-bottom: 15px;
font-size: 18px;
font-weight: 500;
line-height: 20px;
color: #777777;
text-align: center;
}
.navbar-brand:hover,
@@ -2948,10 +2941,9 @@ button.close {
.navbar-toggle {
position: relative;
float: right;
width: 48px;
height: 34px;
padding: 6px 12px;
padding: 9px 10px;
margin-top: 8px;
margin-right: -10px;
margin-bottom: 8px;
background-color: transparent;
border: 1px solid #dddddd;
@@ -3121,12 +3113,6 @@ button.close {
}
@media screen and (min-width: 768px) {
.navbar-brand {
float: left;
max-width: none;
margin-right: 5px;
margin-left: -15px;
}
.navbar-nav {
float: left;
margin-top: 0;