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

sql - VB.NET Operand type clash: date is incompatible with int error -

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

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -