1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-02 01:42:36 +02:00

Simplify disabled styles (#29296)

* Simplify disabled styles

* Mention pointer-events usage
This commit is contained in:
Martijn Cuppens
2019-12-27 17:40:06 +01:00
committed by XhmikosR
parent 167a93a0f3
commit 4387038421
8 changed files with 50 additions and 63 deletions

View File

@@ -38,20 +38,8 @@
}
}
// Disabled comes first so active can properly restyle
&.disabled,
&:disabled {
color: $color;
background-color: $background;
border-color: $border;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
}
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active,
&:active,
&.active,
.show > &.dropdown-toggle {
color: $active-color;
background-color: $active-background;
@@ -69,6 +57,17 @@
}
}
}
&:disabled,
&.disabled {
color: $color;
background-color: $background;
border-color: $border;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
}
}
@mixin button-outline-variant(
@@ -92,14 +91,8 @@
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
&.disabled,
&:disabled {
color: $color;
background-color: transparent;
}
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active,
&:active,
&.active,
.show > &.dropdown-toggle {
color: $active-color;
background-color: $active-background;
@@ -114,6 +107,12 @@
}
}
}
&:disabled,
&.disabled {
color: $color;
background-color: transparent;
}
}
// Button sizes