css - writing LESS mixin for box-shadow: none -


i have problem writing box-shadow mixin using less css.

the following mixin box-shadow

.boxshadow (@x, @y, @blur, @spread: 0, @alpha) {     -webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha);     -moz-box-shadow:    @x @y @blur @spread rgba(0, 0, 0, @alpha);     box-shadow:     @x @y @blur @spread rgba(0, 0, 0, @alpha); } 

but can able pass parameters no issues,

.boxshadow(0, 0, 5px, 2px, 0.2);   

but how call same mixin box-shadow: none

there way access mixin arguments in 1 variable.

you write less mixin in way:

.box-shadow(...) {     -webkit-box-shadow: @arguments;     -moz-box-shadow: @arguments;     box-shadow: @arguments; } 

and use later:

.box-shadow(0 0 5px 2px rgba(0, 0, 0, 0.2));

or

.box-shadow(none);


Comments