I have two different layouts in CSS. One is for mobile (and other narrower screens) and the second one is for desktop. Width of the layout depends on screen width.
/* mobile */
@media (max-width: 25rem) {
.foo {
font-size: 1rem;
color: red;
}
}
/* desktop */
@media (min-width: 25rem) {
.foo {
font-size: 2rem;
}
}
I don't want to reset things that are set in the “mobile” part in the “desktop” part because they are quite different.
When the screen width is exactly 25rem both layouts are applied. How can I prevent this situation?