Is it possible to overload mixins in sass? -


let have mixin shadow such:

@mixin box-shadow($offset, $blur, $color) {    -moz-box-shadow: $offset $offset $blur $color;    -webkit-box-shadow: $offset $offset $blur $color;    box-shadow: $offset $offset $blur $color; } 

is possible overload mixin like:

@mixin box-shadow($offset, $blur) {     @include box-shadow($offset, $blur, #999); } 

or have use different names mixins?

you can't overload, typical practice set defaults.

 /* take color arg, or fall #999 on 2 arg call */  @mixin box-shadow($offset, $blur, $color: #999) {    -webkit-box-shadow: $offset $offset $blur $color;    -moz-box-shadow: $offset $offset $blur $color;    box-shadow: $offset $offset $blur $color;  } 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -