2012-06-29 06:46:45 +02:00
|
|
|
//
|
|
|
|
// Navs
|
|
|
|
// --------------------------------------------------
|
2012-01-08 05:40:28 +01:00
|
|
|
|
|
|
|
|
2012-11-04 00:14:44 +01:00
|
|
|
// Base class
|
2013-01-18 02:02:35 +01:00
|
|
|
// --------------------------------------------------
|
2012-01-08 05:40:28 +01:00
|
|
|
|
|
|
|
.nav {
|
2013-01-16 02:55:14 +01:00
|
|
|
margin-bottom: 0;
|
|
|
|
padding-left: 0; // Override default ul/ol
|
2012-01-08 05:40:28 +01:00
|
|
|
list-style: none;
|
Switch to `&:extend(.clearfix all)` for clearfix mixin
Original discussion:
https://github.com/less/less.js/issues/1437#issuecomment-21383639.
Since we’re switching to `grunt-contrib-less`, we can take advantage of
newer LESS features than what RECESS supported. Included in that is the
ability to `:extend`, and not only that, but `:extend(.mixin-name
all)`. By doing so, we remove duplicate CSS for all our elements that
were being clearfix-ed.
Fixes #8947, #8968, #8991, #9257, #9268, #9291, #9430, #9604, #9686,
#9929, #10731, #10793, #11305, #11498, #11533, #11570, #11604, #11652.
(dem issues, tho)
2013-12-09 08:18:28 +01:00
|
|
|
&:extend(.clearfix all);
|
2013-05-13 00:47:18 +02:00
|
|
|
|
2013-04-16 16:45:51 +02:00
|
|
|
> li {
|
2013-05-13 00:47:18 +02:00
|
|
|
position: relative;
|
2013-04-16 16:45:51 +02:00
|
|
|
display: block;
|
2013-05-13 00:47:18 +02:00
|
|
|
|
2013-04-16 16:45:51 +02:00
|
|
|
> a {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
2013-08-15 22:58:16 +02:00
|
|
|
padding: @nav-link-padding;
|
2013-04-16 16:45:51 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
2013-07-25 09:43:14 +02:00
|
|
|
background-color: @nav-link-hover-bg;
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-13 01:03:56 +02:00
|
|
|
// Disabled state sets text to gray and nukes hover/tab effects
|
2013-04-16 16:45:51 +02:00
|
|
|
&.disabled > a {
|
2013-07-25 09:43:14 +02:00
|
|
|
color: @nav-disabled-link-color;
|
2013-07-07 06:51:47 +02:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 09:43:14 +02:00
|
|
|
color: @nav-disabled-link-hover-color;
|
2013-07-07 06:51:47 +02:00
|
|
|
text-decoration: none;
|
|
|
|
background-color: transparent;
|
2013-07-24 11:10:27 +02:00
|
|
|
cursor: not-allowed;
|
2013-07-07 06:51:47 +02:00
|
|
|
}
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
2013-05-13 01:30:54 +02:00
|
|
|
}
|
2013-05-13 01:03:56 +02:00
|
|
|
|
2013-05-13 01:30:54 +02:00
|
|
|
// Open dropdowns
|
2013-08-16 20:16:32 +02:00
|
|
|
.open > a {
|
2013-07-07 06:51:47 +02:00
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-08-16 20:16:32 +02:00
|
|
|
background-color: @nav-link-hover-bg;
|
2013-07-07 06:51:47 +02:00
|
|
|
border-color: @link-color;
|
2013-05-13 01:03:56 +02:00
|
|
|
}
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
2012-01-08 05:40:28 +01:00
|
|
|
|
2013-09-05 03:52:45 +02: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 06:56:08 +02:00
|
|
|
.nav-divider {
|
2013-04-16 16:45:51 +02:00
|
|
|
.nav-divider();
|
|
|
|
}
|
2013-08-12 10:56:38 +02:00
|
|
|
|
|
|
|
// Prevent IE8 from misplacing imgs
|
2013-09-05 03:52:45 +02:00
|
|
|
//
|
2013-08-12 10:56:38 +02:00
|
|
|
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
|
|
|
> li > a > img {
|
|
|
|
max-width: none;
|
|
|
|
}
|
2012-03-29 02:02:13 +02:00
|
|
|
}
|
|
|
|
|
2012-01-08 05:40:28 +01:00
|
|
|
|
2012-11-04 00:14:44 +01:00
|
|
|
// Tabs
|
|
|
|
// -------------------------
|
2012-01-08 05:40:28 +01:00
|
|
|
|
|
|
|
// Give the tabs something to sit on
|
2012-01-31 06:29:50 +01:00
|
|
|
.nav-tabs {
|
2013-07-25 09:43:14 +02:00
|
|
|
border-bottom: 1px solid @nav-tabs-border-color;
|
2013-04-16 16:45:51 +02:00
|
|
|
> li {
|
|
|
|
float: left;
|
|
|
|
// Make the list-items overlay the bottom border
|
2013-04-22 04:35:36 +02:00
|
|
|
margin-bottom: -1px;
|
2013-04-16 16:45:51 +02: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 19:30:37 +02:00
|
|
|
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-16 03:13:50 +01:00
|
|
|
// Active state, and its :hover to override normal :hover
|
2013-07-07 06:51:47 +02:00
|
|
|
&.active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 09:43:14 +02: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 06:51:47 +02:00
|
|
|
border-bottom-color: transparent;
|
|
|
|
cursor: default;
|
|
|
|
}
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// pulling this in mainly for less shorthand
|
|
|
|
&.nav-justified {
|
2013-07-25 01:52:47 +02:00
|
|
|
.nav-justified();
|
|
|
|
.nav-tabs-justified();
|
2012-01-08 05:40:28 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-16 16:45:51 +02:00
|
|
|
|
2012-11-04 08:52:10 +01:00
|
|
|
// Pills
|
|
|
|
// -------------------------
|
2013-04-16 16:45:51 +02:00
|
|
|
.nav-pills {
|
|
|
|
> li {
|
|
|
|
float: left;
|
|
|
|
|
|
|
|
// Links rendered as pills
|
|
|
|
> a {
|
2013-09-13 21:39:27 +02:00
|
|
|
border-radius: @nav-pills-border-radius;
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
+ li {
|
2013-07-27 07:11:58 +02:00
|
|
|
margin-left: 2px;
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Active state
|
2013-07-07 06:51:47 +02:00
|
|
|
&.active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2013-07-25 09:43:14 +02:00
|
|
|
color: @nav-pills-active-link-hover-color;
|
|
|
|
background-color: @nav-pills-active-link-hover-bg;
|
2013-07-07 06:51:47 +02:00
|
|
|
}
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
}
|
2012-11-04 08:52:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Stacked pills
|
2013-04-16 16:45:51 +02:00
|
|
|
.nav-stacked {
|
|
|
|
> li {
|
|
|
|
float: none;
|
|
|
|
+ li {
|
2013-07-28 18:37:10 +02:00
|
|
|
margin-top: 2px;
|
|
|
|
margin-left: 0; // no need for this gap between nav items
|
2013-04-16 16:45:51 +02:00
|
|
|
}
|
|
|
|
}
|
2012-11-04 08:52:10 +01:00
|
|
|
}
|
|
|
|
|
2013-01-18 02:02:35 +01:00
|
|
|
|
2013-08-02 18:42:50 +02:00
|
|
|
// Nav variations
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Justified nav links
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
.nav-justified {
|
|
|
|
width: 100%;
|
2013-08-16 23:01:32 +02:00
|
|
|
|
2013-08-02 18:42:50 +02:00
|
|
|
> li {
|
|
|
|
float: none;
|
2014-04-26 08:30:50 +02:00
|
|
|
> a {
|
2013-08-02 18:42:50 +02:00
|
|
|
text-align: center;
|
2013-08-27 02:37:52 +02:00
|
|
|
margin-bottom: 5px;
|
2013-08-02 18:42:50 +02:00
|
|
|
}
|
|
|
|
}
|
2013-08-16 23:01:32 +02:00
|
|
|
|
2013-10-29 04:51:39 +01:00
|
|
|
> .dropdown .dropdown-menu {
|
|
|
|
top: auto;
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
|
2013-08-21 02:31:02 +02:00
|
|
|
@media (min-width: @screen-sm-min) {
|
2013-08-16 23:01:32 +02:00
|
|
|
> li {
|
|
|
|
display: table-cell;
|
|
|
|
width: 1%;
|
2013-08-27 02:37:52 +02:00
|
|
|
> a {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2013-08-16 23:01:32 +02:00
|
|
|
}
|
|
|
|
}
|
2013-08-02 18:42:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Move borders to anchors instead of bottom of list
|
2013-10-14 03:58:09 +02:00
|
|
|
//
|
|
|
|
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
|
2013-08-02 18:42:50 +02:00
|
|
|
.nav-tabs-justified {
|
|
|
|
border-bottom: 0;
|
|
|
|
|
2013-08-27 02:37:52 +02:00
|
|
|
> li > a {
|
2013-08-02 18:42:50 +02:00
|
|
|
// Override margin from .nav-tabs
|
|
|
|
margin-right: 0;
|
2013-08-27 02:37:52 +02: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 18:42:50 +02:00
|
|
|
}
|
2013-08-27 02:37:52 +02: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 18:42:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-18 05:18:29 +01:00
|
|
|
// Tabbable tabs
|
|
|
|
// -------------------------
|
|
|
|
|
2013-10-14 00:55:13 +02:00
|
|
|
// Hide tabbable panes to start, show them when `.active`
|
|
|
|
.tab-content {
|
|
|
|
> .tab-pane {
|
|
|
|
display: none;
|
|
|
|
}
|
2013-07-07 06:51:47 +02:00
|
|
|
> .active {
|
|
|
|
display: block;
|
|
|
|
}
|
2013-02-18 05:18:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-05-13 00:47:18 +02:00
|
|
|
// Dropdowns
|
|
|
|
// -------------------------
|
|
|
|
|
2013-05-13 01:12:13 +02:00
|
|
|
// Specific dropdowns
|
2012-03-23 07:09:31 +01:00
|
|
|
.nav-tabs .dropdown-menu {
|
2013-05-13 01:12:13 +02:00
|
|
|
// make dropdown border overlap tab border
|
|
|
|
margin-top: -1px;
|
2012-11-04 00:14:44 +01:00
|
|
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
|
|
|
.border-top-radius(0);
|
2012-01-08 05:40:28 +01:00
|
|
|
}
|