The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS sass mixin with a variable? Re: sass mixin with a variable?

Kitty Giraudel

If you ever want a box-shadow mixin able to accept and output multiple shadows, I just made one:

@mixin shadow($list) {
$res: null;
@each $s in $list { $res: $res, unquote($s); }
@include experimental(box-shadow, $res, -moz, -webkit, not -o, not -ms, not -khtml, official);

div {
@include shadow( (“inset 0 1px 1px red”, “2px 2px black”) );