mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-22 05:03:16 +02:00
Switch to btn-check
This commit is contained in:
committed by
Mark Otto
parent
1a0a0858ef
commit
8b7b234fd1
@@ -14,8 +14,8 @@
|
||||
|
||||
// Bring the hover, focused, and "active" buttons to the front to overlay
|
||||
// the borders properly
|
||||
> .btn-toggle:checked + .btn,
|
||||
> .btn-toggle:focus + .btn,
|
||||
> .btn-check:checked + .btn,
|
||||
> .btn-check:focus + .btn,
|
||||
> .btn:hover,
|
||||
> .btn:focus,
|
||||
> .btn:active,
|
||||
@@ -51,7 +51,7 @@
|
||||
// - Target second buttons which are not part of toggle buttons
|
||||
// - Target third or more child
|
||||
// - Target buttons in a button group
|
||||
> :not(.btn-toggle) + .btn,
|
||||
> :not(.btn-check) + .btn,
|
||||
> .btn:nth-child(n + 3),
|
||||
> .btn-group:not(:first-child) > .btn {
|
||||
@include border-left-radius(0);
|
||||
|
@@ -24,14 +24,14 @@
|
||||
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||
}
|
||||
|
||||
.btn-toggle:focus + &,
|
||||
.btn-check:focus + &,
|
||||
&:focus {
|
||||
outline: 0;
|
||||
box-shadow: $btn-focus-box-shadow;
|
||||
}
|
||||
|
||||
.btn-toggle:checked + &,
|
||||
.btn-toggle:active + &,
|
||||
.btn-check:checked + &,
|
||||
.btn-check:active + &,
|
||||
&:active,
|
||||
&.active {
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
@@ -135,7 +135,7 @@
|
||||
margin-right: $form-check-inline-margin-right;
|
||||
}
|
||||
|
||||
.btn-toggle {
|
||||
.btn-check {
|
||||
position: absolute;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
border-color: $hover-border;
|
||||
}
|
||||
|
||||
.btn-toggle:focus + &,
|
||||
.btn-check:focus + &,
|
||||
&:focus {
|
||||
color: $hover-color;
|
||||
@include gradient-bg($hover-background);
|
||||
@@ -38,8 +38,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.btn-toggle:checked + &,
|
||||
.btn-toggle:active + &,
|
||||
.btn-check:checked + &,
|
||||
.btn-check:active + &,
|
||||
&:active,
|
||||
&.active,
|
||||
.show > &.dropdown-toggle {
|
||||
@@ -85,13 +85,13 @@
|
||||
border-color: $active-border;
|
||||
}
|
||||
|
||||
.btn-toggle:focus + &,
|
||||
.btn-check:focus + &,
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
||||
}
|
||||
|
||||
.btn-toggle:checked + &,
|
||||
.btn-toggle:active + &,
|
||||
.btn-check:checked + &,
|
||||
.btn-check:active + &,
|
||||
&:active,
|
||||
&.active,
|
||||
&.dropdown-toggle.show {
|
||||
|
Reference in New Issue
Block a user