Home › Forums › CSS › sass mixin with a variable? › Re: sass mixin with a variable?
April 17, 2013 at 6:54 pm
#132222
Participant
@mixin boxshadow($h: 0px, $v: 1px, $b:2px, $brand-color: rgba(0,0,0,.25)){
-webkit-box-shadow : $h $v $b $brand-color;
-moz-box-shadow : $h $v $b $brand-color;
box-shadow : $h $v $b $brand-color;
}
Using it, like so:
div{
@include boxshadow(0px,1px,2px,rgba(green,0.4));
}
If you don’t specify any options and use the mixin as `@include boxshadow()` default styles defined in the mixin will be applied.