I'm new to scss and I have a short question.
I have this scss code
.page {
max-width: 1200px;
position: relative;
width: 100%;
ul{
background-color: black;
width: 30%;
height: 100px;
@media (max-width: 900px){
background-color: red;
}
}
ul li{
color: white;
@media (max-width: 900px){
color: black;
}
}
}
The css file looks like that
.page {
max-width: 1200px;
position: relative;
width: 100%;
}
/* line 9, style.scss */
.page ul {
background-color: black;
width: 30%;
height: 100px;
}
@media (max-width: 900px) {
/* line 9, style.scss */
.page ul {
background-color: red;
}
}
/* line 21, style.scss */
.page ul li {
color: white;
}
@media (max-width: 900px) {
/* line 21, style.scss */
.page ul li {
color: black;
}
}
The question: is there a way that I just got one media query, cause is 2xtimes max-width: 900px. without getting rid of the nested @media.