1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 11:21:23 +02:00

Revamp dropdown item states

- Removes the plain-hover-focus mixin from active and disabled states; no need for them.
- Adds :active and :disabled since we can use button elements here, too.
- Wrap the disabled background-image override in an -gradients condition.
This commit is contained in:
Mark Otto
2016-12-28 00:20:06 -08:00
committed by Mark Otto
parent d6fa9f5a6c
commit 9ce5fb5817

View File

@@ -81,30 +81,21 @@
background-color: $dropdown-link-hover-bg; background-color: $dropdown-link-hover-bg;
} }
// Active state &.active,
&.active { &:active {
@include plain-hover-focus {
color: $dropdown-link-active-color; color: $dropdown-link-active-color;
text-decoration: none; text-decoration: none;
background-color: $dropdown-link-active-bg; background-color: $dropdown-link-active-bg;
outline: 0;
}
} }
// Disabled state &.disabled,
// &:disabled {
// Gray out text and ensure the hover/focus state remains gray
&.disabled {
@include plain-hover-focus {
color: $dropdown-link-disabled-color; color: $dropdown-link-disabled-color;
}
// Nuke hover/focus effects
@include hover-focus {
text-decoration: none;
cursor: $cursor-disabled; cursor: $cursor-disabled;
background-color: transparent; background-color: transparent;
background-image: none; // Remove CSS gradient // Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
} }
} }
} }