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

Form check markup v2 (#25050)

* match layout behaviors

* ditch the indicator as separate element for psuedo-elements on the label

* move disabled to attribute only on input

* redo default inline check to support new markup

* redo inline forms

* clean up vars

* update validation mixin to new structure

* update checks in docs

* linting for for/id attributes
This commit is contained in:
Mark Otto
2017-12-22 16:13:01 -08:00
committed by GitHub
parent 13150872c6
commit 16f1417240
7 changed files with 235 additions and 268 deletions

View File

@@ -69,34 +69,32 @@
}
}
// TODO: redo check markup lol crap
.form-check-input {
.was-validated &:#{$state},
&.is-#{$state} {
+ .form-check-label {
~ .form-check-label {
color: $color;
}
}
}
// custom radios and checks
.custom-control-input {
.was-validated &:#{$state},
&.is-#{$state} {
~ .custom-control-indicator {
background-color: lighten($color, 25%);
}
~ .custom-control-description {
~ .custom-control-label {
color: $color;
&::before {
background-color: lighten($color, 25%);
}
}
&:checked {
~ .custom-control-indicator {
~ .custom-control-label::before {
@include gradient-bg(lighten($color, 10%));
}
}
&:focus {
~ .custom-control-indicator {
~ .custom-control-label::before {
box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-focus-width rgba($color, .25);
}
}