Media queries in sass nesting?

Can't deal with media queries, sass

There is a conditional html design
<div_1>
<div_2>
<div_3>
 .... And so on 
</div>
</div>
</div>


In sass write here so
.div_1 { 
.div_2{
.div_3{
}
}
}


1) please help to understand with the correct nesting, some in which blocks should be added, but what what does not. In the Internet in detail can find
2) you have to write @media to say the end of the block .div_3. In a separate dock just write that address to him and it does not work
And then I realized that the final css for it looks like this -
@media(){
.div_1 . .div_2 .div_3{
}
}


I don't want the whole intestine in the media queries to write, So do a lot will come out

And if you just inside .div_3 to write, too weird. Have many units under my adaptiv and if to write in each request, the result css will be a lot of queries inside where there is only one selector

Next, I got confused. Please, explain how it's all nicely done in sass. With looks, what, where, how, and @media
April 3rd 20 at 18:38
1 answer
April 3rd 20 at 18:40
Solution
1) please help to understand with proper nesting

Use nesting only in rare cases or no use, to use any methodology in ru segment is dominated by BEM.
And if you just inside .div_3 to write, too weird. Have many units under my adaptiv and if to write in each request, the result css will be a lot of queries inside where there is only one selector

Unable to face that in any place the type selector .div_1 . .div_2 .div_3 will block yours .div_3. In scss is a convenient way to write media queries
.div_3 {
 color: #000;
 @media screen {
 color: #fff;
}
}

Combining mixins and variables adding auto-completion editor it is possible to achieve high-speed writing of such structures, adding to the collector plugins for cleaning css that combine blocks with identical media queries. For example like this
Please tell me the resource for BEM clear how to work with him. And the fact that no look is very technical and confusing - Garry_Spencer85 commented on April 3rd 20 at 18:43

Find more questions by tags CSSSass