0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00
Bootstrap/less/navs.less

167 lines
2.7 KiB
Plaintext
Raw Normal View History

2012-06-29 06:46:45 +02:00
//
// Navs
// --------------------------------------------------
2014-07-09 22:51:49 +02:00
.nav {
2014-07-14 08:33:54 +02:00
margin-bottom: 0;
2014-07-09 22:51:49 +02:00
.list-unstyled();
&:extend(.clearfix all);
}
.nav-item {
position: relative;
display: inline-block;
2014-07-09 22:51:49 +02:00
}
.nav-link {
display: inline-block;
2014-07-09 22:51:49 +02:00
padding: @nav-link-padding;
line-height: @line-height-base;
&:hover,
&:focus {
text-decoration: none;
background-color: @nav-link-hover-bg;
}
// Disabled state sets text to gray and nukes hover/tab effects
.disabled > &,
&.disabled {
2014-07-09 22:51:49 +02:00
color: @nav-disabled-link-color;
&,
&:hover,
&:focus {
color: @nav-disabled-link-hover-color;
background-color: transparent;
cursor: not-allowed;
}
}
}
//
2012-11-04 00:14:44 +01:00
// Tabs
//
.nav-tabs {
border-bottom: 1px solid @nav-tabs-border-color;
.nav-item {
2013-04-16 16:45:51 +02:00
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
2013-04-16 16:45:51 +02:00
+ .nav-item {
margin-left: .2rem;
2013-04-16 16:45:51 +02:00
}
}
.nav-link {
display: block;
border: 1px solid transparent;
.border-radius(@border-radius-base @border-radius-base 0 0);
2013-04-16 16:45:51 +02:00
&:hover,
&:focus {
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-04-16 16:45:51 +02:00
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
color: @nav-tabs-active-link-hover-color;
background-color: @nav-tabs-active-link-hover-bg;
border-color: @nav-tabs-active-link-hover-border-color @nav-tabs-active-link-hover-border-color transparent;
2013-04-16 16:45:51 +02:00
}
}
.disabled > .nav-link,
.nav-link.disabled {
&,
&:hover,
&:focus {
color: @nav-disabled-link-color;
background-color: transparent;
border-color: transparent;
2013-04-16 16:45:51 +02:00
}
}
}
//
// Pills
//
.nav-pills {
.nav-item {
float: left;
+ .nav-item {
margin-left: .2rem;
}
}
.nav-link {
display: block;
.border-radius(@nav-pills-border-radius);
}
.open > .nav-link,
.active > .nav-link,
.nav-link.open,
.nav-link.active {
&,
&:hover,
&:focus {
color: @component-active-color;
background-color: @component-active-bg;
cursor: default;
}
}
}
.nav-stacked {
.nav-item {
float: none;
display: block;
+ .nav-item {
margin-top: .2rem;
margin-left: 0;
}
}
}
//
// Tabbable tabs
//
// 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;
}
}
//
// Dropdowns
//
.nav-tabs .dropdown-menu {
// 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);
}