I like to make mixins with SASS that help me make good cross-browser compatibility. I want to make a mixin that looks like this:
@mixin box-shadow($value) {
i want to point out that you can also pass a value using the argument name as you call the mixin:
@mixin shadow($shadow: 0 0 2px #000) {
box-shadow: $shadow;
-webkit-box-shadow: $shadow;
-moz-box-shadow: $shadow;
}
.my-shadow {
@include shadow($shadow: 0 0 5px #900, 0 2px 2px #000);
}
note that scss is scoped so $shadow
will still retain its mixin value if used again later. less i believe, suffers from reassignment in this scenario