2017-03-03 20:34:10 +01:00
|
|
|
@mixin box-shadow($shadow...) {
|
|
|
|
@if $enable-shadows {
|
2019-01-07 01:52:39 +01:00
|
|
|
$result: ();
|
|
|
|
|
2019-01-08 18:42:28 +01: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-07 01:52:39 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@if (length($result) > 0) {
|
|
|
|
box-shadow: $result;
|
|
|
|
}
|
2017-03-03 20:34:10 +01:00
|
|
|
}
|
|
|
|
}
|