1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-31 17:11:48 +02:00

Remove checkbox/radio toggle from button plugin in favor of a CSS only solution

This commit is contained in:
Martijn Cuppens
2020-05-02 11:11:24 +02:00
committed by Mark Otto
parent 1b2ea5efb1
commit 1a0a0858ef
10 changed files with 122 additions and 317 deletions

View File

@@ -25,8 +25,8 @@
border-color: $hover-border;
}
&:focus,
&.focus {
.btn-toggle:focus + &,
&:focus {
color: $hover-color;
@include gradient-bg($hover-background);
border-color: $hover-border;
@@ -38,6 +38,8 @@
}
}
.btn-toggle:checked + &,
.btn-toggle:active + &,
&:active,
&.active,
.show > &.dropdown-toggle {
@@ -83,11 +85,13 @@
border-color: $active-border;
}
&:focus,
&.focus {
.btn-toggle:focus + &,
&:focus {
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
.btn-toggle:checked + &,
.btn-toggle:active + &,
&:active,
&.active,
&.dropdown-toggle.show {