Invalid output from box-shadow mixin
Closed this issue · 0 comments
oncode commented
The blank/default $inset
parameter in the box-shadow
mixin (#1) is producing following invalid output:
-webkit-box-shadow: "" 2px 2px 5px rgba(0, 0, 0, 0.4);
-moz-box-shadow: "" 2px 2px 5px rgba(0, 0, 0, 0.4);
box-shadow: "" 2px 2px 5px rgba(0, 0, 0, 0.4);
(sass version: 3.2.9)
I suggest to check if the string is empty:
/* BOX SHADOW */
@mixin box-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4), $inset: "") {
@if ($inset != "") {
-webkit-box-shadow: $inset $x $y $blur $color;
-moz-box-shadow: $inset $x $y $blur $color;
box-shadow: $inset $x $y $blur $color;
} @else {
-webkit-box-shadow: $x $y $blur $color;
-moz-box-shadow: $x $y $blur $color;
box-shadow: $x $y $blur $color;
}
}