1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 20:55:50 +02:00

Update .form-check to properly support gradients when enabled (#29338)

This commit is contained in:
Mark Otto
2019-10-28 00:12:07 -07:00
committed by Martijn Cuppens
parent 9c7bc1a111
commit b81a23a60d
4 changed files with 38 additions and 10 deletions

View File

@@ -122,7 +122,7 @@
border-color: $color;
&:checked {
@include gradient-bg(lighten($color, 10%));
@include gradient-bg(lighten($color, 10%), escape-svg($form-check-input-checked-bg-image));
}
&:focus {

View File

@@ -1,8 +1,15 @@
// Gradients
@mixin gradient-bg($color) {
@mixin gradient-bg($color, $foreground: null) {
@if $enable-gradients {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
@if $foreground {
background-color: $color;
background-image: $foreground, linear-gradient(180deg, mix($body-bg, $color, 15%), $color);
background-repeat: no-repeat;
background-size: 1em, auto;
} @else {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
}
} @else {
background-color: $color;
}