0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-02 02:29:24 +01:00

more nesting in navs.less

This commit is contained in:
Chris Rebert 2013-07-06 21:51:47 -07:00
parent 95655e7275
commit 15bd6eadf3

View File

@ -31,14 +31,15 @@
// Disabled state sets text to gray and nukes hover/tab effects // Disabled state sets text to gray and nukes hover/tab effects
&.disabled > a { &.disabled > a {
color: @gray-light; color: @gray-light;
}
&.disabled > a:hover, &:hover,
&.disabled > a:focus { &:focus {
color: @gray-light; color: @gray-light;
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
cursor: default; cursor: default;
} }
}
// Space the headers out when they follow another list item (link) // Space the headers out when they follow another list item (link)
+ .nav-header { + .nav-header {
@ -47,9 +48,10 @@
} }
// Open dropdowns // Open dropdowns
&.open > a, &.open > a {
&.open > a:hover, &,
&.open > a:focus { &:hover,
&:focus {
color: #fff; color: #fff;
background-color: @link-color; background-color: @link-color;
border-color: @link-color; border-color: @link-color;
@ -58,6 +60,7 @@
border-bottom-color: #fff; border-bottom-color: #fff;
} }
} }
}
// Redeclare pull classes because of specificity // Redeclare pull classes because of specificity
// Todo: consider making these utilities !important to avoid this bullshit // Todo: consider making these utilities !important to avoid this bullshit
@ -99,9 +102,10 @@
} }
// Active state, and it's :hover to override normal :hover // Active state, and it's :hover to override normal :hover
&.active > a, &.active > a {
&.active > a:hover, &,
&.active > a:focus { &:hover,
&:focus {
color: @gray; color: @gray;
background-color: @body-bg; background-color: @body-bg;
border: 1px solid #ddd; border: 1px solid #ddd;
@ -109,6 +113,7 @@
cursor: default; cursor: default;
} }
} }
}
// pulling this in mainly for less shorthand // pulling this in mainly for less shorthand
&.nav-justified { &.nav-justified {
.nav-justified; .nav-justified;
@ -134,14 +139,16 @@
} }
// Active state // Active state
&.active > a, &.active > a {
&.active > a:hover, &,
&.active > a:focus { &:hover,
&:focus {
color: #fff; color: #fff;
background-color: @component-active-bg; background-color: @component-active-bg;
} }
} }
} }
}
// Stacked pills // Stacked pills
@ -218,10 +225,12 @@
.pill-content > .pill-pane { .pill-content > .pill-pane {
display: none; display: none;
} }
.tab-content > .active, .tab-content,
.pill-content > .active { .pill-content {
> .active {
display: block; display: block;
} }
}