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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -