2012-06-29 00:46:45 -04:00
|
|
|
//
|
|
|
|
// Navs
|
|
|
|
// --------------------------------------------------
|
2012-01-07 23:40:28 -05:00
|
|
|
|
|
|
|
|
2012-11-03 19:14:44 -04:00
|
|
|
// Base class
|
2013-01-17 20:02:35 -05:00
|
|
|
// --------------------------------------------------
|
2012-01-07 23:40:28 -05:00
|
|
|
|
|
|
|
.nav {
|
2013-01-15 20:55:14 -05:00
|
|
|
margin-bottom: 0;
|
|
|
|
padding-left: 0; // Override default ul/ol
|
2012-01-07 23:40:28 -05:00
|
|
|
list-style: none;
|
2013-03-30 16:23:18 -04:00
|
|
|
.clearfix();
|
2013-05-12 18:47:18 -04:00
|
|
|
|
2013-04-16 10:45:51 -04:00
|
|
|
> li {
|
2013-05-12 18:47:18 -04:00
|
|
|
position: relative;
|
2013-04-16 10:45:51 -04:00
|
|
|
display: block;
|
2013-05-12 18:47:18 -04:00
|
|
|
|
2013-04-16 10:45:51 -04:00
|
|
|
> a {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
2013-08-15 16:58:16 -04:00
|
|
|
padding: @nav-link-padding;
|
2013-04-16 10:45:51 -04:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
2013-07-25 03:43:14 -04:00
|
|
|
background-color: @nav-link-hover-bg;
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-12 19:03:56 -04:00
|
|
|
// Disabled state sets text to gray and nukes hover/tab effects
|
2013-04-16 10:45:51 -04:00
|
|
|
&.disabled > a {
|
2013-07-25 03:43:14 -04:00
|
|
|
color: @nav-disabled-link-color;
|
2013-07-07 00:51:47 -04:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 03:43:14 -04:00
|
|
|
color: @nav-disabled-link-hover-color;
|
2013-07-07 00:51:47 -04:00
|
|
|
text-decoration: none;
|
|
|
|
background-color: transparent;
|
2013-07-24 05:10:27 -04:00
|
|
|
cursor: not-allowed;
|
2013-07-07 00:51:47 -04:00
|
|
|
}
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
2013-05-12 19:30:54 -04:00
|
|
|
}
|
2013-05-12 19:03:56 -04:00
|
|
|
|
2013-05-12 19:30:54 -04:00
|
|
|
// Open dropdowns
|
2013-08-16 14:16:32 -04:00
|
|
|
.open > a {
|
2013-07-07 00:51:47 -04:00
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-08-16 14:16:32 -04:00
|
|
|
background-color: @nav-link-hover-bg;
|
2013-07-07 00:51:47 -04:00
|
|
|
border-color: @link-color;
|
2013-05-12 19:03:56 -04:00
|
|
|
}
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
2012-01-07 23:40:28 -05:00
|
|
|
|
2013-09-04 21:52:45 -04:00
|
|
|
// Nav dividers (deprecated with v3.0.1)
|
|
|
|
//
|
|
|
|
// This should have been removed in v3 with the dropping of `.nav-list`, but
|
|
|
|
// we missed it. We don't currently support this anywhere, but in the interest
|
|
|
|
// of maintaining backward compatibility in case you use it, it's deprecated.
|
2013-05-09 00:56:08 -04:00
|
|
|
.nav-divider {
|
2013-04-16 10:45:51 -04:00
|
|
|
.nav-divider();
|
|
|
|
}
|
2013-08-12 04:56:38 -04:00
|
|
|
|
|
|
|
// Prevent IE8 from misplacing imgs
|
2013-09-04 21:52:45 -04:00
|
|
|
//
|
2013-08-12 04:56:38 -04:00
|
|
|
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
|
|
|
> li > a > img {
|
|
|
|
max-width: none;
|
|
|
|
}
|
2012-03-28 20:02:13 -04:00
|
|
|
}
|
|
|
|
|
2012-01-07 23:40:28 -05:00
|
|
|
|
2012-11-03 19:14:44 -04:00
|
|
|
// Tabs
|
|
|
|
// -------------------------
|
2012-01-07 23:40:28 -05:00
|
|
|
|
|
|
|
// Give the tabs something to sit on
|
2012-01-31 00:29:50 -05:00
|
|
|
.nav-tabs {
|
2013-07-25 03:43:14 -04:00
|
|
|
border-bottom: 1px solid @nav-tabs-border-color;
|
2013-04-16 10:45:51 -04:00
|
|
|
> li {
|
|
|
|
float: left;
|
|
|
|
// Make the list-items overlay the bottom border
|
2013-04-21 22:35:36 -04:00
|
|
|
margin-bottom: -1px;
|
2013-04-16 10:45:51 -04:00
|
|
|
|
|
|
|
// Actual tabs (as links)
|
|
|
|
> a {
|
|
|
|
margin-right: 2px;
|
|
|
|
line-height: @line-height-base;
|
|
|
|
border: 1px solid transparent;
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
&:hover {
|
2013-08-15 13:30:37 -04:00
|
|
|
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Active state, and it's :hover to override normal :hover
|
2013-07-07 00:51:47 -04:00
|
|
|
&.active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 03:43:14 -04:00
|
|
|
color: @nav-tabs-active-link-hover-color;
|
|
|
|
background-color: @nav-tabs-active-link-hover-bg;
|
|
|
|
border: 1px solid @nav-tabs-active-link-hover-border-color;
|
2013-07-07 00:51:47 -04:00
|
|
|
border-bottom-color: transparent;
|
|
|
|
cursor: default;
|
|
|
|
}
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// pulling this in mainly for less shorthand
|
|
|
|
&.nav-justified {
|
2013-07-24 19:52:47 -04:00
|
|
|
.nav-justified();
|
|
|
|
.nav-tabs-justified();
|
2012-01-07 23:40:28 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-16 10:45:51 -04:00
|
|
|
|
2012-11-04 02:52:10 -05:00
|
|
|
// Pills
|
|
|
|
// -------------------------
|
2013-04-16 10:45:51 -04:00
|
|
|
.nav-pills {
|
|
|
|
> li {
|
|
|
|
float: left;
|
|
|
|
|
|
|
|
// Links rendered as pills
|
|
|
|
> a {
|
|
|
|
border-radius: 5px;
|
|
|
|
}
|
|
|
|
+ li {
|
2013-07-27 01:11:58 -04:00
|
|
|
margin-left: 2px;
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Active state
|
2013-07-07 00:51:47 -04:00
|
|
|
&.active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 03:43:14 -04:00
|
|
|
color: @nav-pills-active-link-hover-color;
|
|
|
|
background-color: @nav-pills-active-link-hover-bg;
|
2013-07-07 00:51:47 -04:00
|
|
|
}
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
}
|
2012-11-04 02:52:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Stacked pills
|
2013-04-16 10:45:51 -04:00
|
|
|
.nav-stacked {
|
|
|
|
> li {
|
|
|
|
float: none;
|
|
|
|
+ li {
|
2013-07-28 12:37:10 -04:00
|
|
|
margin-top: 2px;
|
|
|
|
margin-left: 0; // no need for this gap between nav items
|
2013-04-16 10:45:51 -04:00
|
|
|
}
|
|
|
|
}
|
2012-11-04 02:52:10 -05:00
|
|
|
}
|
|
|
|
|
2013-01-17 20:02:35 -05:00
|
|
|
|
2013-08-02 12:42:50 -04:00
|
|
|
// Nav variations
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Justified nav links
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
.nav-justified {
|
|
|
|
width: 100%;
|
2013-08-16 17:01:32 -04:00
|
|
|
|
2013-08-02 12:42:50 -04:00
|
|
|
> li {
|
|
|
|
float: none;
|
2013-08-16 17:01:32 -04:00
|
|
|
> a {
|
2013-08-02 12:42:50 -04:00
|
|
|
text-align: center;
|
2013-08-26 20:37:52 -04:00
|
|
|
margin-bottom: 5px;
|
2013-08-02 12:42:50 -04:00
|
|
|
}
|
|
|
|
}
|
2013-08-16 17:01:32 -04:00
|
|
|
|
2013-08-20 20:31:02 -04:00
|
|
|
@media (min-width: @screen-sm-min) {
|
2013-08-16 17:01:32 -04:00
|
|
|
> li {
|
|
|
|
display: table-cell;
|
|
|
|
width: 1%;
|
2013-08-26 20:37:52 -04:00
|
|
|
> a {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2013-08-16 17:01:32 -04:00
|
|
|
}
|
|
|
|
}
|
2013-08-02 12:42:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Move borders to anchors instead of bottom of list
|
|
|
|
.nav-tabs-justified {
|
|
|
|
border-bottom: 0;
|
|
|
|
|
2013-08-26 20:37:52 -04:00
|
|
|
> li > a {
|
2013-08-02 12:42:50 -04:00
|
|
|
// Override margin from .nav-tabs
|
|
|
|
margin-right: 0;
|
2013-08-26 20:37:52 -04:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .active > a,
|
|
|
|
> .active > a:hover,
|
|
|
|
> .active > a:focus {
|
|
|
|
border: 1px solid @nav-tabs-justified-link-border-color;
|
2013-08-02 12:42:50 -04:00
|
|
|
}
|
2013-08-26 20:37:52 -04:00
|
|
|
|
|
|
|
@media (min-width: @screen-sm-min) {
|
|
|
|
> li > a {
|
|
|
|
border-bottom: 1px solid @nav-tabs-justified-link-border-color;
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
}
|
|
|
|
> .active > a,
|
|
|
|
> .active > a:hover,
|
|
|
|
> .active > a:focus {
|
|
|
|
border-bottom-color: @nav-tabs-justified-active-link-border-color;
|
|
|
|
}
|
2013-08-02 12:42:50 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-17 23:18:29 -05:00
|
|
|
// Tabbable tabs
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
// Clear any floats
|
|
|
|
.tabbable {
|
|
|
|
.clearfix();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Show/hide tabbable areas
|
|
|
|
.tab-content > .tab-pane,
|
|
|
|
.pill-content > .pill-pane {
|
|
|
|
display: none;
|
|
|
|
}
|
2013-07-07 00:51:47 -04:00
|
|
|
.tab-content,
|
|
|
|
.pill-content {
|
|
|
|
> .active {
|
|
|
|
display: block;
|
|
|
|
}
|
2013-02-17 23:18:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-12 18:47:18 -04:00
|
|
|
// Dropdowns
|
|
|
|
// -------------------------
|
|
|
|
|
2013-05-12 19:12:13 -04:00
|
|
|
// Make dropdown carets use link color in navs
|
|
|
|
.nav .caret {
|
|
|
|
border-top-color: @link-color;
|
|
|
|
border-bottom-color: @link-color;
|
|
|
|
}
|
|
|
|
.nav a:hover .caret {
|
|
|
|
border-top-color: @link-hover-color;
|
|
|
|
border-bottom-color: @link-hover-color;
|
2013-05-12 18:47:18 -04:00
|
|
|
}
|
|
|
|
|
2013-05-12 19:12:13 -04:00
|
|
|
// Specific dropdowns
|
2012-03-23 02:09:31 -04:00
|
|
|
.nav-tabs .dropdown-menu {
|
2013-05-12 19:12:13 -04:00
|
|
|
// make dropdown border overlap tab border
|
|
|
|
margin-top: -1px;
|
2012-11-03 19:14:44 -04:00
|
|
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
|
|
|
.border-top-radius(0);
|
2012-01-07 23:40:28 -05:00
|
|
|
}
|