nesting media queries

Hey, if i'd like something to occur when the viewport width is 640px or above but below 960px, would it be bad practice to nest media queries like this?
@media (min-width: 640px) {
@media (max-width: 960px) {
...
}
}
@media (min-width: 640px) {
@media (max-width: 960px) {
...
}
}
Thanks in advance.
2 Replies
Chris Bolson
Chris Bolson7mo ago
You can do that like this
@media (min-width: 640px) and (max-width: 960px) {

}
@media (min-width: 640px) and (max-width: 960px) {

}
snxxwyy
snxxwyyOP7mo ago
Ohh I totally forgot about that, thanks a bunch
Want results from more Discord servers?
Add your server