0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

take account 'none' for box-shadow (#27972)

This commit is contained in:
wojtask9 2019-01-07 01:52:39 +01:00 committed by XhmikosR
parent cbc8a7273a
commit 42bed436e8
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,14 @@
@mixin box-shadow($shadow...) {
@if $enable-shadows {
box-shadow: $shadow;
$result: ();
@for $i from 1 through length($shadow) {
@if nth($shadow, $i) != "none" {
$result: append($result, nth($shadow, $i), "comma");
}
}
@if (length($result) > 0) {
box-shadow: $result;
}
}
}

View File

@ -49,7 +49,7 @@
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
@if $enable-shadows and $btn-active-box-shadow != none {
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
} @else {
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);