3 // --------------------------------------------------
6 // Wrapper and base class
8 // Provide a static navbar from which we expand to create full-width, fixed, and
9 // other navbar variations.
13 min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
14 margin-bottom: @navbar-margin-bottom;
15 background-color: @navbar-bg;
16 border: 1px solid @navbar-border;
18 // Prevent floats from breaking the navbar
21 @media (min-width: @grid-float-breakpoint) {
22 border-radius: @navbar-border-radius;
29 // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
30 // styling of responsive aspects.
33 padding-left: @navbar-padding-horizontal;
34 padding-right: @navbar-padding-horizontal;
37 @media (min-width: @grid-float-breakpoint) {
43 // Navbar collapse (body)
45 // Group your navbar content into this for easy collapsing and expanding across
46 // various device sizes. By default, this content is collapsed when <768px, but
47 // will expand past that for a horizontal display.
49 // To start (on mobile devices) the navbar links, forms, and buttons are stacked
50 // vertically and include a `max-height` to overflow in case you have too much
51 // content for the user's viewport.
56 padding-right: @navbar-padding-horizontal;
57 padding-left: @navbar-padding-horizontal;
58 border-top: 1px solid darken(@navbar-bg, 7%);
59 box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
61 -webkit-overflow-scrolling: touch;
67 @media (min-width: @grid-float-breakpoint) {
75 display: block !important;
76 height: auto !important;
77 padding-bottom: 0; // Override default setting
78 overflow: visible !important;
89 // Navbar alignment options
91 // Display the navbar across the entirity of the page or fixed it to the top or
92 // bottom of the page.
94 // Static top (unfixed, but 100% wide) navbar
96 border-width: 0 0 1px;
97 @media (min-width: @grid-float-breakpoint) {
102 // Fix the top/bottom navbars when screen real estate supports it
104 .navbar-fixed-bottom {
108 z-index: @zindex-navbar-fixed;
109 border-width: 0 0 1px;
111 // Undo the rounded corners
112 @media (min-width: @grid-float-breakpoint) {
119 .navbar-fixed-bottom {
121 margin-bottom: 0; // override .navbar defaults
125 // Brand/project name
129 padding-top: @navbar-padding-vertical;
130 padding-bottom: @navbar-padding-vertical;
131 font-size: @font-size-large;
132 line-height: @line-height-computed;
133 color: @navbar-brand-color;
136 color: @navbar-brand-hover-color;
137 text-decoration: none;
138 background-color: @navbar-brand-hover-bg;
145 // Custom button for toggling the `.navbar-collapse`, powered by the collapse
146 // JavaScript plugin.
152 .navbar-vertical-align(34px);
153 background-color: transparent;
154 border: 1px solid @navbar-toggle-border-color;
155 border-radius: @border-radius-base;
159 background-color: @navbar-toggle-hover-bg;
167 background-color: @navbar-toggle-icon-bar-bg;
170 .icon-bar + .icon-bar {
174 @media (min-width: @grid-float-breakpoint) {
185 // Builds on top of the `.nav` components with it's own modifier class to make
186 // the nav the full height of the horizontal nav (above 768px).
189 margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
193 padding-bottom: 10px;
194 color: @navbar-link-color;
195 line-height: @line-height-computed;
198 color: @navbar-link-hover-color;
199 background-color: @navbar-link-hover-bg;
206 color: @navbar-link-active-color;
207 background-color: @navbar-link-active-bg;
214 color: @navbar-link-disabled-color;
215 background-color: @navbar-link-disabled-bg;
219 @media (max-width: @screen-phone-max) {
220 // Dropdowns get custom display when collapsed
221 .open .dropdown-menu {
226 background-color: transparent;
231 padding: 5px 15px 5px 25px;
234 color: @navbar-link-color;
235 line-height: @line-height-computed;
238 color: @navbar-link-hover-color;
239 background-color: @navbar-link-hover-bg;
240 background-image: none;
247 color: @navbar-link-active-color;
248 background-color: @navbar-link-active-bg;
255 color: @navbar-link-disabled-color;
256 background-color: @navbar-link-disabled-bg;
262 // Uncollapse the nav
263 @media (min-width: @grid-float-breakpoint) {
270 padding-top: ((@navbar-height - @line-height-computed) / 2);
271 padding-bottom: ((@navbar-height - @line-height-computed) / 2);
279 // Component alignment
281 // Repurpose the pull utilities as their own navbar utilities to avoid specifity
282 // issues with parents and chaining. Only do this when the navbar is uncollapsed
283 // though so that navbar contents properly stack and align in mobile.
285 @media (min-width: @grid-float-breakpoint) {
286 .navbar-left { .pull-left(); }
290 .pull-right > .dropdown-menu();
298 // Extension of the `.form-inline` with some extra flavor for optimum display in
302 margin-left: -@navbar-padding-horizontal;
303 margin-right: -@navbar-padding-horizontal;
304 padding: 10px @navbar-padding-horizontal;
305 border-top: 1px solid darken(@navbar-bg, 7%);
306 border-bottom: 1px solid darken(@navbar-bg, 7%);
307 @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
308 .box-shadow(@shadow);
310 // Mixin behavior for optimum display
314 @media (max-width: @screen-phone-max) {
319 // Vertically center in expanded, horizontal navbar
320 .navbar-vertical-align(@input-height-base);
322 // Undo 100% width for pull classes
323 @media (min-width: @grid-float-breakpoint) {
337 // Menu position and menu carets
338 .navbar-nav > li > .dropdown-menu {
340 .border-top-radius(0);
342 // Menu position and menu caret support for dropups via extra dropup class
343 .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
344 .border-bottom-radius(0);
347 // Dropdown menu items and carets
349 // Caret should match text color on hover
350 > .dropdown > a:hover .caret,
351 > .dropdown > a:focus .caret {
352 border-top-color: @navbar-link-hover-color;
353 border-bottom-color: @navbar-link-hover-color;
356 // Remove background color from open dropdown
361 background-color: @navbar-link-active-bg;
362 color: @navbar-link-active-color;
364 border-top-color: @navbar-link-active-color;
365 border-bottom-color: @navbar-link-active-color;
369 > .dropdown > a .caret {
370 border-top-color: @navbar-link-color;
371 border-bottom-color: @navbar-link-color;
375 // Right aligned menus need alt position
376 .navbar-nav.pull-right > li > .dropdown-menu,
377 .navbar-nav > li > .dropdown-menu.pull-right {
383 // Buttons in navbars
385 // Vertically center a button within a navbar (when *not* in a form).
388 .navbar-vertical-align(@input-height-base);
394 // Add a class to make any element properly align itself vertically within the navbars.
398 color: @navbar-color;
399 .navbar-vertical-align(@line-height-computed);
401 @media (min-width: @grid-float-breakpoint) {
402 margin-left: @navbar-padding-horizontal;
403 margin-right: @navbar-padding-horizontal;
410 // Add a class to ensure links outside the navbar nav are colored correctly.
412 // Default navbar variables
414 color: @navbar-link-color;
416 color: @navbar-link-hover-color;
422 // --------------------------------------------------
425 background-color: @navbar-inverse-bg;
426 border-color: @navbar-inverse-border;
429 color: @navbar-inverse-brand-color;
432 color: @navbar-inverse-brand-hover-color;
433 background-color: @navbar-inverse-brand-hover-bg;
438 color: @navbar-inverse-color;
443 color: @navbar-inverse-link-color;
447 color: @navbar-inverse-link-hover-color;
448 background-color: @navbar-inverse-link-hover-bg;
455 color: @navbar-inverse-link-active-color;
456 background-color: @navbar-inverse-link-active-bg;
463 color: @navbar-inverse-link-disabled-color;
464 background-color: @navbar-inverse-link-disabled-bg;
469 // Darken the responsive nav toggle
471 border-color: @navbar-inverse-toggle-border-color;
474 background-color: @navbar-inverse-toggle-hover-bg;
477 background-color: @navbar-inverse-toggle-icon-bar-bg;
483 border-color: darken(@navbar-inverse-bg, 7%);
492 background-color: @navbar-inverse-link-active-bg;
493 color: @navbar-inverse-link-active-color;
496 > .dropdown > a:hover .caret {
497 border-top-color: @navbar-inverse-link-hover-color;
498 border-bottom-color: @navbar-inverse-link-hover-color;
500 > .dropdown > a .caret {
501 border-top-color: @navbar-inverse-link-color;
502 border-bottom-color: @navbar-inverse-link-color;
509 border-top-color: @navbar-inverse-link-active-color;
510 border-bottom-color: @navbar-inverse-link-active-color;
515 @media (max-width: @screen-phone-max) {
516 // Dropdowns get custom display
517 .open .dropdown-menu {
519 border-color: @navbar-inverse-border;
522 color: @navbar-inverse-link-color;
525 color: @navbar-inverse-link-hover-color;
526 background-color: @navbar-inverse-link-hover-bg;
533 color: @navbar-inverse-link-active-color;
534 background-color: @navbar-inverse-link-active-bg;
541 color: @navbar-inverse-link-disabled-color;
542 background-color: @navbar-inverse-link-disabled-bg;
550 color: @navbar-inverse-link-color;
552 color: @navbar-inverse-link-hover-color;