Answer the question
In order to leave comments, you need to log in
Why is the sass rule not working?
Good afternoon, tell me this question. I do it as a tutorial. why the rule does not work, although everything works in the video description.
<ul class="menu">
<li class="menu_item"><a href="#" class="menu_link">Главная</a></li>
<li class="menu_item"><a href="#require" class="menu_link">ппппппп</a></li>
</ul>
@media (max-width:1200px)
.menu
&_item
padding-right: 20px
.menu
&_item
padding-right: 20px
&_link
font-size: 13px
@media (max-width:1200px)
.menu
&_item
padding-right: 20px
.menu_item .menu_link
font-size: 13px
.subheader
&_logo
img
width: 100%
&_text
font-size: 11px
.subheader
&_logo
img
width: 100%
.col-md-4.offset-md-1 .subheader_text
font-size: 11px
Answer the question
In order to leave comments, you need to log in
sass result
.menu
&_link
no , just .
There is a problem with this somewhere.
Maybe down the code there is another declaration for , which has a higher priority in the right of precedence, and when you already specify this rule has a higher priority over the next one as a more precise selector.
Most likely this ad is going lower in 1200px - in that case just change the order of . .menu_item .menu_link
.menu_link
@media
max-width
@media
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question