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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -