To know the sass structure -


this sass structure please explain mean?

actually analysing code structure. unable understad structure.

.class-name{   styles..   &.class-name2{     styles..   } } 

the & tells pre-processor add parent selector in-front of nested class.

so this:

.class-name{       background: blue       &.class-name2{           background: red;       } } 

would compile too:

.class-name {background: blue;} .class-name.class-name2 {background: red;} 

the usage be:

<div class="class-name">this background blue</div> 

and

<div class="class-name class-name2">this background red</div> 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -