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

Merge pull request #8414 from cvrebert/dropdowns-LESS-nesting

use LESS nesting more in dropdowns.less
This commit is contained in:
Mark Otto
2013-07-08 06:56:57 -07:00

View File

@@ -62,41 +62,49 @@
// Hover/Focus state // Hover/Focus state
// ----------- // -----------
.dropdown-menu > li > a:hover, .dropdown-menu > li > a {
.dropdown-menu > li > a:focus { &:hover,
&:focus {
text-decoration: none; text-decoration: none;
color: @dropdown-link-hover-color; color: @dropdown-link-hover-color;
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
} }
}
// Active state // Active state
// ------------ // ------------
.dropdown-menu > .active > a, .dropdown-menu > .active > a {
.dropdown-menu > .active > a:hover, &,
.dropdown-menu > .active > a:focus { &:hover,
&:focus {
color: @dropdown-link-active-color; color: @dropdown-link-active-color;
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
} }
}
// Disabled state // Disabled state
// -------------- // --------------
// Gray out text and ensure the hover/focus state remains gray // Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a {
.dropdown-menu > .disabled > a:hover, &,
.dropdown-menu > .disabled > a:focus { &:hover,
&:focus {
color: @gray-light; color: @gray-light;
} }
}
// Nuke hover/focus effects // Nuke hover/focus effects
.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a {
.dropdown-menu > .disabled > a:focus { &:hover,
&:focus {
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
background-image: none; // Remove CSS gradient background-image: none; // Remove CSS gradient
.reset-filter(); .reset-filter();
cursor: default; cursor: default;
} }
}
// Open state for the dropdown // Open state for the dropdown
// --------------------------- // ---------------------------