Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <otto@github.com>2013-08-15 08:32:23 +0400
committerMark Otto <otto@github.com>2013-08-15 08:32:23 +0400
commit9de788134fa40e37577a324c0d37377dc0369ec9 (patch)
tree66a8b9ee41e390c8f3215cc3f19b3dd811ac2982 /less/navbar.less
parent2e8a146b61af1e197208ae2d52ee4bf4034352d4 (diff)
refactor navbar file to better nest css and restore navbar-color to navbar text (fixes #9500)
Diffstat (limited to 'less/navbar.less')
-rw-r--r--less/navbar.less149
1 files changed, 65 insertions, 84 deletions
diff --git a/less/navbar.less b/less/navbar.less
index 33e90a25eb..5d1280ce2f 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -69,6 +69,13 @@
padding: 0;
border-top: 0;
box-shadow: none;
+
+ &.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0; // Override default setting
+ overflow: visible !important;
+ }
}
}
@@ -159,6 +166,13 @@
.icon-bar + .icon-bar {
margin-top: 4px;
}
+
+ @media (min-width: @grid-float-breakpoint) {
+ position: relative;
+ top: auto;
+ left: auto;
+ display: none;
+ }
}
@@ -171,11 +185,6 @@
margin-left: -@navbar-padding-horizontal;
margin-right: -@navbar-padding-horizontal;
- @media (min-width: @grid-float-breakpoint) {
- margin-left: 0;
- margin-right: 0;
- }
-
> li > a {
padding-top: 10px;
padding-bottom: 10px;
@@ -205,7 +214,7 @@
}
@media (max-width: @screen-phone-max) {
- // Dropdowns get custom display
+ // Dropdowns get custom display when collapsed
.open .dropdown-menu {
position: static;
float: none;
@@ -247,6 +256,20 @@
}
}
+ // Uncollapse the nav
+ @media (min-width: @grid-float-breakpoint) {
+ float: left;
+ margin: 0;
+
+ > li {
+ float: left;
+ > a {
+ padding-top: ((@navbar-height - @line-height-computed) / 2);
+ padding-bottom: ((@navbar-height - @line-height-computed) / 2);
+ }
+ }
+ }
+
}
@@ -351,6 +374,38 @@
}
+// Buttons in navbars
+//
+// Vertically center a button within a navbar (when *not* in a form).
+
+.navbar-btn {
+ margin-top: ((@navbar-height - @input-height-base) / 2);
+}
+
+
+// Text in navbars
+//
+// Add a class to make any element properly align itself vertically within the navbars.
+
+.navbar-text {
+ float: left;
+ color: @navbar-color;
+ .navbar-vertical-align(@line-height-computed);
+}
+
+
+// Links in navbars
+//
+// Add a class to ensure links outside the navbar nav are colored correctly.
+
+// Default navbar variables
+.navbar-link {
+ color: @navbar-link-color;
+ &:hover {
+ color: @navbar-link-hover-color;
+ }
+}
+
// Inverse navbar
// --------------------------------------------------
@@ -479,85 +534,11 @@
}
}
-}
-
-
-
-// Responsive navbar
-// --------------------------------------------------
-
-@media screen and (min-width: @grid-float-breakpoint) {
-
- .navbar-nav {
- float: left;
- // undo margin to make nav extend full height of navbar
- margin-top: 0;
- margin-bottom: 0;
-
- > li {
- float: left;
- > a {
- padding-top: ((@navbar-height - @line-height-computed) / 2);
- padding-bottom: ((@navbar-height - @line-height-computed) / 2);
- }
+ .navbar-link {
+ color: @navbar-inverse-link-color;
+ &:hover {
+ color: @navbar-inverse-link-hover-color;
}
}
- // Required to make the collapsing navbar work on regular desktops
- .navbar-toggle {
- position: relative;
- top: auto;
- left: auto;
- display: none;
- }
- .navbar-collapse.collapse {
- display: block !important;
- height: auto !important;
- padding-bottom: 0; // Override default setting
- overflow: visible !important;
- }
-
-}
-
-
-
-// Buttons in navbars
-//
-// Vertically center a button within a navbar (when *not* in a form).
-
-.navbar-btn {
- margin-top: ((@navbar-height - @input-height-base) / 2);
-}
-
-
-
-// Text in navbars
-//
-// Add a class to make any element properly align itself vertically within the navbars.
-
-.navbar-text {
- float: left;
- .navbar-vertical-align(@line-height-computed);
-}
-
-
-
-// Links in navbars
-//
-// Add a class to ensure links outside the navbar nav are colored correctly.
-
-// Default navbar variables
-.navbar-link {
- color: @navbar-link-color;
- &:hover {
- color: @navbar-link-hover-color;
- }
-}
-
-// Use the inverse navbar variables
-.navbar-inverse .navbar-link {
- color: @navbar-inverse-link-color;
- &:hover {
- color: @navbar-inverse-link-hover-color;
- }
}