2017-03-03 14:34:10 -05:00
|
|
|
@mixin box-shadow($shadow...) {
|
|
|
|
@if $enable-shadows {
|
2019-01-06 19:52:39 -05:00
|
|
|
$result: ();
|
|
|
|
|
2019-01-08 12:42:28 -05:00
|
|
|
@if (length($shadow) == 1) {
|
|
|
|
// We can pass `@include box-shadow(none);`
|
|
|
|
$result: $shadow;
|
|
|
|
} @else {
|
|
|
|
// Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
|
|
|
|
@for $i from 1 through length($shadow) {
|
|
|
|
@if nth($shadow, $i) != "none" {
|
|
|
|
$result: append($result, nth($shadow, $i), "comma");
|
|
|
|
}
|
2019-01-06 19:52:39 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@if (length($result) > 0) {
|
|
|
|
box-shadow: $result;
|
|
|
|
}
|
2017-03-03 14:34:10 -05:00
|
|
|
}
|
|
|
|
}
|