SAME change the style of nested elements

I would like to use the SMACSS naming system with SASS. Expect the following SASS code:

nav ul margin: 0 padding: 0 list-style: none 

as a conclusion, I get

 nav ul { margin: 0; padding: 0; list-style: none; } 

but according to the class of the SMACSS methodology, the naming should look like this:

 nav-ul { margin: 0; padding: 0; list-style: none; } 

Could you please advise how to change the class naming style in SASS to achieve this?

0
source share
1 answer

You can write it like this:

 nav &-ul margin: 0 padding: 0 list-style: none 

result:

 nav-ul { margin: 0; padding: 0; list-style: none; } 
+1
source

Source: https://habr.com/ru/post/972101/


All Articles