mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Merge pull request #8411 from cvrebert/navbar-LESS-nesting
more nesting in navbar.less
This commit is contained in:
commit
46378c7ba3
10
docs/assets/css/bootstrap.css
vendored
10
docs/assets/css/bootstrap.css
vendored
@ -2948,11 +2948,6 @@ button.close {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
.navbar-nav > .dropdown > a .caret {
|
||||
border-top-color: #777777;
|
||||
border-bottom-color: #777777;
|
||||
}
|
||||
|
||||
.navbar-nav > .open > a .caret,
|
||||
.navbar-nav > .open > a:hover .caret,
|
||||
.navbar-nav > .open > a:focus .caret {
|
||||
@ -2960,6 +2955,11 @@ button.close {
|
||||
border-bottom-color: #555555;
|
||||
}
|
||||
|
||||
.navbar-nav > .dropdown > a .caret {
|
||||
border-top-color: #777777;
|
||||
border-bottom-color: #777777;
|
||||
}
|
||||
|
||||
.navbar-nav.pull-right > li > .dropdown-menu,
|
||||
.navbar-nav > li > .dropdown-menu.pull-right {
|
||||
right: 0;
|
||||
|
118
less/navbar.less
118
less/navbar.less
@ -30,23 +30,27 @@
|
||||
color: @navbar-link-color;
|
||||
line-height: 20px;
|
||||
border-radius: @border-radius-base;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-link-hover-color;
|
||||
background-color: @navbar-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> li > a:hover,
|
||||
> li > a:focus {
|
||||
color: @navbar-link-hover-color;
|
||||
background-color: @navbar-link-hover-bg;
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-link-active-color;
|
||||
background-color: @navbar-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .active > a,
|
||||
> .active > a:hover,
|
||||
> .active > a:focus {
|
||||
color: @navbar-link-active-color;
|
||||
background-color: @navbar-link-active-bg;
|
||||
}
|
||||
> .disabled > a,
|
||||
> .disabled > a:hover,
|
||||
> .disabled > a:focus {
|
||||
color: @navbar-link-disabled-color;
|
||||
background-color: @navbar-link-disabled-bg;
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-link-disabled-color;
|
||||
background-color: @navbar-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Right aligned contents
|
||||
@ -168,22 +172,22 @@
|
||||
}
|
||||
|
||||
// Remove background color from open dropdown
|
||||
> .open > a,
|
||||
> .open > a:hover,
|
||||
> .open > a:focus {
|
||||
background-color: @navbar-link-active-bg;
|
||||
color: @navbar-link-active-color;
|
||||
> .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;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .dropdown > a .caret {
|
||||
border-top-color: @navbar-link-color;
|
||||
border-bottom-color: @navbar-link-color;
|
||||
}
|
||||
> .open > a .caret,
|
||||
> .open > a:hover .caret,
|
||||
> .open > a:focus .caret {
|
||||
border-top-color: @navbar-link-active-color;
|
||||
border-bottom-color: @navbar-link-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Right aligned menus need alt position
|
||||
@ -217,23 +221,28 @@
|
||||
.navbar-nav {
|
||||
> li > a {
|
||||
color: @navbar-inverse-link-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-inverse-link-hover-color;
|
||||
background-color: @navbar-inverse-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> li > a:hover,
|
||||
> li > a:focus {
|
||||
color: @navbar-inverse-link-hover-color;
|
||||
background-color: @navbar-inverse-link-hover-bg;
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-inverse-link-active-color;
|
||||
background-color: @navbar-inverse-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .active > a,
|
||||
> .active > a:hover,
|
||||
> .active > a:focus {
|
||||
color: @navbar-inverse-link-active-color;
|
||||
background-color: @navbar-inverse-link-active-bg;
|
||||
}
|
||||
> .disabled > a,
|
||||
> .disabled > a:hover,
|
||||
> .disabled > a:focus {
|
||||
color: @navbar-inverse-link-disabled-color;
|
||||
background-color: @navbar-inverse-link-disabled-bg;
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @navbar-inverse-link-disabled-color;
|
||||
background-color: @navbar-inverse-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,11 +260,13 @@
|
||||
|
||||
// Dropdowns
|
||||
.navbar-nav {
|
||||
> .open > a,
|
||||
> .open > a:hover,
|
||||
> .open > a:focus {
|
||||
background-color: @navbar-inverse-link-active-bg;
|
||||
color: @navbar-inverse-link-active-color;
|
||||
> .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: @navbar-inverse-link-active-bg;
|
||||
color: @navbar-inverse-link-active-color;
|
||||
}
|
||||
}
|
||||
> .dropdown > a:hover .caret {
|
||||
border-top-color: @navbar-inverse-link-hover-color;
|
||||
@ -265,13 +276,16 @@
|
||||
border-top-color: @navbar-inverse-link-color;
|
||||
border-bottom-color: @navbar-inverse-link-color;
|
||||
}
|
||||
> .open > a .caret,
|
||||
> .open > a:hover .caret,
|
||||
> .open > a:focus .caret {
|
||||
border-top-color: @navbar-inverse-link-active-color;
|
||||
border-bottom-color: @navbar-inverse-link-active-color;
|
||||
> .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
.caret {
|
||||
border-top-color: @navbar-inverse-link-active-color;
|
||||
border-bottom-color: @navbar-inverse-link-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user