2012-06-29 06:46:45 +02:00
|
|
|
//
|
2013-01-16 02:55:14 +01:00
|
|
|
// Navbars
|
2012-06-29 06:46:45 +02:00
|
|
|
// --------------------------------------------------
|
2012-01-05 19:01:42 +01:00
|
|
|
|
2013-01-16 02:55:14 +01:00
|
|
|
// Wrapper and base class
|
|
|
|
.navbar {
|
2013-02-18 10:28:35 +01:00
|
|
|
position: relative;
|
2013-07-18 10:25:08 +02:00
|
|
|
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
|
2013-08-12 03:32:52 +02:00
|
|
|
margin-bottom: @navbar-margin-bottom;
|
2013-07-18 10:04:54 +02:00
|
|
|
padding-left: @navbar-padding-horizontal;
|
|
|
|
padding-right: @navbar-padding-horizontal;
|
2013-01-17 00:35:41 +01:00
|
|
|
background-color: @navbar-bg;
|
2013-08-05 09:47:23 +02:00
|
|
|
border-radius: @navbar-border-radius;
|
2013-05-01 04:07:28 +02:00
|
|
|
|
2013-01-17 01:14:41 +01:00
|
|
|
// Prevent floats from breaking the navbar
|
2013-03-30 21:23:18 +01:00
|
|
|
.clearfix();
|
2013-01-16 02:55:14 +01:00
|
|
|
}
|
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
// Navbar nav links
|
2013-01-17 01:14:41 +01:00
|
|
|
// -------------------------
|
|
|
|
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav {
|
|
|
|
> li > a {
|
2013-05-10 02:20:46 +02:00
|
|
|
padding-top: ((@navbar-height - @line-height-computed) / 2);
|
|
|
|
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
|
2013-01-17 20:34:46 +01:00
|
|
|
color: @navbar-link-color;
|
2013-08-03 21:07:43 +02:00
|
|
|
line-height: @line-height-computed;
|
2013-05-15 07:08:56 +02:00
|
|
|
border-radius: @border-radius-base;
|
2013-07-07 23:40:18 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-link-hover-color;
|
|
|
|
background-color: @navbar-link-hover-bg;
|
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
2013-07-07 23:40:18 +02:00
|
|
|
> .active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-link-active-color;
|
|
|
|
background-color: @navbar-link-active-bg;
|
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
2013-07-07 23:40:18 +02:00
|
|
|
> .disabled > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-link-disabled-color;
|
|
|
|
background-color: @navbar-link-disabled-bg;
|
|
|
|
}
|
2013-03-01 08:20:25 +01:00
|
|
|
}
|
2013-06-21 02:15:09 +02:00
|
|
|
|
|
|
|
// Right aligned contents
|
|
|
|
// Make them full width first so that they align properly on mobile
|
|
|
|
&.pull-right {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Navbar alignment options
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Static navbar
|
|
|
|
.navbar-static-top {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
|
2013-02-18 03:33:55 +01:00
|
|
|
// Fix the top/bottom navbars when screen real estate supports it
|
2013-01-17 20:34:46 +01:00
|
|
|
.navbar-fixed-top,
|
|
|
|
.navbar-fixed-bottom {
|
2013-02-18 03:33:55 +01:00
|
|
|
position: fixed;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: @zindex-navbar-fixed;
|
2013-01-17 20:34:46 +01:00
|
|
|
border-radius: 0;
|
|
|
|
}
|
2013-05-04 22:11:20 +02:00
|
|
|
.navbar-fixed-top {
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
.navbar-fixed-bottom {
|
|
|
|
bottom: 0;
|
|
|
|
margin-bottom: 0; // override .navbar defaults
|
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
|
2013-08-07 01:39:18 +02:00
|
|
|
.nav-collapse {
|
2013-08-12 04:06:26 +02:00
|
|
|
// Prevent overlap of `.navbar-brand` and `.navbar-toggle`
|
|
|
|
clear: both;
|
2013-08-07 01:39:18 +02:00
|
|
|
// Space out collapsed contents within the mobile navbar
|
|
|
|
padding-bottom: @navbar-padding-vertical;
|
|
|
|
// Clear floated elements and prevent collapsing of padding
|
|
|
|
.clearfix();
|
2013-08-07 02:28:02 +02:00
|
|
|
|
|
|
|
// When there is no `.navbar-brand` present (which normally sits between the
|
|
|
|
// navbar brand and toggle), prevent the nav from overlapping the toggle.
|
|
|
|
.navbar-toggle + & {
|
|
|
|
width: 100%;
|
|
|
|
margin-top: @navbar-height;
|
|
|
|
}
|
2013-08-07 01:39:18 +02:00
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
|
2013-08-07 02:28:02 +02:00
|
|
|
|
2013-08-05 23:19:32 +02:00
|
|
|
// Scrollable navbar navigation
|
|
|
|
//
|
|
|
|
// Sometimes you might have too many links in your fixed navbar and you need to
|
|
|
|
// maintain access to all that content. To help, add `.nav-collapse-scrollable`
|
|
|
|
// to your `.nav-collapse` to prevent the the content from flowing past the max-
|
|
|
|
// height of your browser.
|
|
|
|
//
|
|
|
|
// This is not automatically added to the `.navbar-fixed-top` because it causes
|
|
|
|
// z-index bugs in iOS7 (possibly earlier).
|
|
|
|
|
|
|
|
@media (max-width: @screen-small) {
|
|
|
|
.nav-collapse-scrollable {
|
|
|
|
margin-bottom: @navbar-padding-vertical;
|
|
|
|
max-height: 360px;
|
|
|
|
overflow-y: scroll;
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Navbar optional components
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Brand/project name
|
2013-02-18 10:28:35 +01:00
|
|
|
.navbar-brand {
|
2013-08-12 04:06:26 +02:00
|
|
|
float: left;
|
2013-08-12 04:19:44 +02:00
|
|
|
margin-right: 15px;
|
2013-08-12 04:06:26 +02:00
|
|
|
padding-top: @navbar-padding-vertical;
|
|
|
|
padding-bottom: @navbar-padding-vertical;
|
2013-04-24 00:41:06 +02:00
|
|
|
font-size: @font-size-large;
|
2013-05-10 02:20:46 +02:00
|
|
|
line-height: @line-height-computed;
|
2013-01-17 00:35:41 +01:00
|
|
|
color: @navbar-brand-color;
|
2013-02-06 04:53:44 +01:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-04-01 02:56:31 +02:00
|
|
|
color: @navbar-brand-hover-color;
|
2013-01-16 02:55:14 +01:00
|
|
|
text-decoration: none;
|
2013-04-01 02:56:31 +02:00
|
|
|
background-color: @navbar-brand-hover-bg;
|
2013-01-16 02:55:14 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
// Collapsible navbar toggle
|
2013-02-18 10:28:35 +01:00
|
|
|
.navbar-toggle {
|
2013-08-03 16:28:17 +02:00
|
|
|
position: relative;
|
|
|
|
float: right;
|
2013-08-12 04:06:26 +02:00
|
|
|
padding: 9px 10px;
|
2013-08-03 16:28:17 +02:00
|
|
|
.navbar-vertical-align(34px);
|
2013-08-12 04:06:26 +02:00
|
|
|
margin-right: -10px;
|
2013-02-18 10:28:35 +01:00
|
|
|
background-color: transparent;
|
2013-07-25 08:58:25 +02:00
|
|
|
border: 1px solid @navbar-toggle-border-color;
|
|
|
|
border-radius: @border-radius-base;
|
2013-01-16 02:55:14 +01:00
|
|
|
|
2013-02-18 10:28:35 +01:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 08:58:25 +02:00
|
|
|
background-color: @navbar-toggle-hover-bg;
|
2013-02-18 10:28:35 +01:00
|
|
|
}
|
|
|
|
|
2013-01-16 02:55:14 +01:00
|
|
|
// Bars
|
|
|
|
.icon-bar {
|
|
|
|
display: block;
|
2013-02-18 10:28:35 +01:00
|
|
|
width: 22px;
|
2013-01-16 02:55:14 +01:00
|
|
|
height: 2px;
|
2013-07-25 08:58:25 +02:00
|
|
|
background-color: @navbar-toggle-icon-bar-bg;
|
2013-01-16 02:55:14 +01:00
|
|
|
border-radius: 1px;
|
|
|
|
}
|
|
|
|
.icon-bar + .icon-bar {
|
2013-02-18 10:28:35 +01:00
|
|
|
margin-top: 4px;
|
2013-01-16 02:55:14 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
// Navbar form
|
|
|
|
.navbar-form {
|
2013-05-10 01:41:35 +02:00
|
|
|
.form-inline();
|
2013-05-20 07:12:48 +02:00
|
|
|
.navbar-vertical-align(@input-height-base); // Vertically center in navbar
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
2013-01-17 20:20:19 +01:00
|
|
|
|
2013-01-17 20:55:37 +01:00
|
|
|
// Dropdown menus
|
|
|
|
|
|
|
|
// Menu position and menu carets
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav > li > .dropdown-menu {
|
2013-01-17 20:55:37 +01:00
|
|
|
margin-top: 0;
|
2013-08-09 09:44:10 +02:00
|
|
|
.border-top-radius(0);
|
2013-01-17 20:55:37 +01:00
|
|
|
}
|
|
|
|
// Menu position and menu caret support for dropups via extra dropup class
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
|
2013-08-09 09:44:10 +02:00
|
|
|
.border-bottom-radius(0);
|
2013-01-17 20:55:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Dropdown menu items and carets
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav {
|
2013-01-17 20:55:37 +01:00
|
|
|
// Caret should match text color on hover
|
2013-05-13 01:30:54 +02:00
|
|
|
> .dropdown > a:hover .caret,
|
|
|
|
> .dropdown > a:focus .caret {
|
2013-04-01 02:56:31 +02:00
|
|
|
border-top-color: @navbar-link-hover-color;
|
|
|
|
border-bottom-color: @navbar-link-hover-color;
|
2013-01-17 20:55:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Remove background color from open dropdown
|
2013-07-07 23:40:18 +02:00
|
|
|
> .open > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background-color: @navbar-link-active-bg;
|
|
|
|
color: @navbar-link-active-color;
|
|
|
|
.caret {
|
|
|
|
border-top-color: @navbar-link-active-color;
|
|
|
|
border-bottom-color: @navbar-link-active-color;
|
|
|
|
}
|
|
|
|
}
|
2013-01-17 20:55:37 +01:00
|
|
|
}
|
2013-05-13 01:30:54 +02:00
|
|
|
> .dropdown > a .caret {
|
2013-01-17 20:55:37 +01:00
|
|
|
border-top-color: @navbar-link-color;
|
|
|
|
border-bottom-color: @navbar-link-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Right aligned menus need alt position
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav.pull-right > li > .dropdown-menu,
|
|
|
|
.navbar-nav > li > .dropdown-menu.pull-right {
|
2013-01-17 20:55:37 +01:00
|
|
|
left: auto;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
2013-01-17 01:14:41 +01:00
|
|
|
|
2013-01-16 02:55:14 +01:00
|
|
|
|
|
|
|
// Inverse navbar
|
2013-01-17 20:34:46 +01:00
|
|
|
// --------------------------------------------------
|
2013-01-17 01:14:41 +01:00
|
|
|
|
2013-01-16 02:55:14 +01:00
|
|
|
.navbar-inverse {
|
2013-01-17 20:55:37 +01:00
|
|
|
background-color: @navbar-inverse-bg;
|
2013-01-16 02:55:14 +01:00
|
|
|
|
2013-02-18 10:28:35 +01:00
|
|
|
.navbar-brand {
|
2013-01-17 08:33:26 +01:00
|
|
|
color: @navbar-inverse-brand-color;
|
2013-01-02 23:39:21 +01:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-04-07 23:47:53 +02:00
|
|
|
color: @navbar-inverse-brand-hover-color;
|
|
|
|
background-color: @navbar-inverse-brand-hover-bg;
|
2013-01-16 02:55:14 +01:00
|
|
|
}
|
|
|
|
}
|
2013-01-17 08:33:26 +01:00
|
|
|
|
|
|
|
.navbar-text {
|
2013-05-04 00:29:32 +02:00
|
|
|
color: @navbar-inverse-color;
|
2013-01-17 08:33:26 +01:00
|
|
|
}
|
|
|
|
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav {
|
|
|
|
> li > a {
|
|
|
|
color: @navbar-inverse-link-color;
|
2013-07-07 23:40:18 +02:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-inverse-link-hover-color;
|
|
|
|
background-color: @navbar-inverse-link-hover-bg;
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-07-07 23:40:18 +02:00
|
|
|
> .active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-inverse-link-active-color;
|
|
|
|
background-color: @navbar-inverse-link-active-bg;
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-07-07 23:40:18 +02:00
|
|
|
> .disabled > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @navbar-inverse-link-disabled-color;
|
|
|
|
background-color: @navbar-inverse-link-disabled-bg;
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-03-01 08:20:25 +01:00
|
|
|
}
|
2013-01-17 20:34:46 +01:00
|
|
|
|
2013-01-17 20:55:37 +01:00
|
|
|
// Darken the responsive nav toggle
|
2013-02-18 10:28:35 +01:00
|
|
|
.navbar-toggle {
|
2013-07-25 08:58:25 +02:00
|
|
|
border-color: @navbar-inverse-toggle-border-color;
|
2013-02-18 10:28:35 +01:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 08:58:25 +02:00
|
|
|
background-color: @navbar-inverse-toggle-hover-bg;
|
2013-02-18 10:28:35 +01:00
|
|
|
}
|
2013-03-01 09:18:10 +01:00
|
|
|
.icon-bar {
|
2013-07-25 08:58:25 +02:00
|
|
|
background-color: @navbar-inverse-toggle-icon-bar-bg;
|
2013-03-01 09:18:10 +01:00
|
|
|
}
|
2013-01-16 02:55:14 +01:00
|
|
|
}
|
|
|
|
|
2013-01-17 20:55:37 +01:00
|
|
|
// Dropdowns
|
2013-04-28 03:28:39 +02:00
|
|
|
.navbar-nav {
|
2013-07-07 23:40:18 +02:00
|
|
|
> .open > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background-color: @navbar-inverse-link-active-bg;
|
|
|
|
color: @navbar-inverse-link-active-color;
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-05-13 01:30:54 +02:00
|
|
|
> .dropdown > a:hover .caret {
|
2013-04-28 03:28:39 +02:00
|
|
|
border-top-color: @navbar-inverse-link-hover-color;
|
|
|
|
border-bottom-color: @navbar-inverse-link-hover-color;
|
|
|
|
}
|
2013-05-13 01:30:54 +02:00
|
|
|
> .dropdown > a .caret {
|
2013-04-28 03:28:39 +02:00
|
|
|
border-top-color: @navbar-inverse-link-color;
|
|
|
|
border-bottom-color: @navbar-inverse-link-color;
|
|
|
|
}
|
2013-07-07 23:40:18 +02:00
|
|
|
> .open > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
.caret {
|
|
|
|
border-top-color: @navbar-inverse-link-active-color;
|
|
|
|
border-bottom-color: @navbar-inverse-link-active-color;
|
|
|
|
}
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-01-17 20:55:37 +01:00
|
|
|
}
|
2013-01-17 01:14:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-04 22:11:20 +02:00
|
|
|
// Responsive navbar
|
2013-01-17 01:14:41 +01:00
|
|
|
// --------------------------------------------------
|
|
|
|
|
2013-06-03 00:51:28 +02:00
|
|
|
@media screen and (min-width: @grid-float-breakpoint) {
|
2013-04-28 03:28:39 +02:00
|
|
|
|
2013-08-12 04:19:44 +02:00
|
|
|
// Undo clearing to keep nav and brand horizontal
|
|
|
|
.nav-collapse {
|
|
|
|
clear: none;
|
|
|
|
}
|
|
|
|
|
2013-06-20 18:40:30 +02:00
|
|
|
.navbar-nav {
|
2013-01-17 20:34:46 +01:00
|
|
|
float: left;
|
2013-05-15 07:08:56 +02:00
|
|
|
// undo margin to make nav extend full height of navbar
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 0;
|
2013-04-28 03:28:39 +02:00
|
|
|
|
|
|
|
> li {
|
|
|
|
float: left;
|
2013-05-15 07:08:56 +02:00
|
|
|
> a {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
2013-04-28 03:28:39 +02:00
|
|
|
}
|
2013-01-16 02:55:14 +01:00
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
&.pull-right {
|
2013-06-21 02:15:09 +02:00
|
|
|
width: auto;
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
|
|
|
}
|
2012-08-27 19:32:07 +02:00
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
// Required to make the collapsing navbar work on regular desktops
|
2013-02-18 10:28:35 +01:00
|
|
|
.navbar-toggle {
|
|
|
|
position: relative;
|
|
|
|
top: auto;
|
|
|
|
left: auto;
|
2013-01-17 20:34:46 +01:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.nav-collapse.collapse {
|
2013-07-27 05:44:35 +02:00
|
|
|
display: block !important;
|
2013-01-17 20:34:46 +01:00
|
|
|
height: auto !important;
|
2013-08-07 01:39:18 +02:00
|
|
|
padding-bottom: 0; // Override default setting
|
2013-01-17 20:34:46 +01:00
|
|
|
overflow: visible !important;
|
|
|
|
}
|
2013-01-17 20:55:37 +01:00
|
|
|
|
2013-01-17 20:34:46 +01:00
|
|
|
}
|
2012-01-18 09:24:10 +01:00
|
|
|
|
2013-05-03 08:05:09 +02:00
|
|
|
|
2013-05-03 08:13:43 +02:00
|
|
|
|
|
|
|
// Buttons in navbars
|
2013-05-03 08:05:09 +02:00
|
|
|
//
|
|
|
|
// Vertically center a button within a navbar (when *not* in a form).
|
|
|
|
|
|
|
|
.navbar-btn {
|
|
|
|
margin-top: ((@navbar-height - @input-height-base) / 2);
|
|
|
|
}
|
|
|
|
|
2012-07-30 19:08:27 +02:00
|
|
|
|
2013-05-03 08:13:43 +02:00
|
|
|
|
|
|
|
// Text in navbars
|
|
|
|
//
|
|
|
|
// Add a class to make any element properly align itself vertically within the navbars.
|
|
|
|
|
|
|
|
.navbar-text {
|
2013-07-30 03:30:21 +02:00
|
|
|
float: left;
|
|
|
|
padding: 0 @navbar-padding-horizontal;
|
2013-05-10 02:20:46 +02:00
|
|
|
.navbar-vertical-align(@line-height-computed);
|
2013-05-03 08:13:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Links in navbars
|
|
|
|
//
|
|
|
|
// Add a class to ensure links outside the navbar nav are colored correctly.
|
|
|
|
|
|
|
|
// Default navbar variables
|
2012-07-30 19:08:27 +02:00
|
|
|
.navbar-link {
|
2012-12-01 00:33:56 +01:00
|
|
|
color: @navbar-link-color;
|
2012-07-30 19:08:27 +02:00
|
|
|
&:hover {
|
2013-04-01 02:56:31 +02:00
|
|
|
color: @navbar-link-hover-color;
|
2012-01-15 02:16:46 +01:00
|
|
|
}
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
|
2013-05-03 08:13:43 +02:00
|
|
|
// Use the inverse navbar variables
|
|
|
|
.navbar-inverse .navbar-link {
|
|
|
|
color: @navbar-inverse-link-color;
|
|
|
|
&:hover {
|
|
|
|
color: @navbar-inverse-link-hover-color;
|
|
|
|
}
|
|
|
|
}
|