Sass multiple styles with same attributes -


is there quicker way write same style result in sass.?

e.g without sass:

bottom: auto; left: auto; right: auto; top: auto; 

with sass

bottom, left, right, top {     auto; } 

i'm not if fit exact needs, might case mixin.

with scss syntax be:

@mixin position($position) {    bottom: $position;    top: $position;    left: $position;    right: $position; } 

you can use mixin

div { @include position(auto); } 

which equivalent div each of positioning properties set "auto"

sass syntax, completion sake

=position($position) {    bottom: $position;    top: $position;    left: $position;    right: $position; } 

and usage

div   +position(auto) 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -