u/MWrathDevin r/Frontend • Recommends
On “Why mobile first?”
It reads better in terms of media queries especially if you're using a preprocessor (most are capable of nesting) because it's easier mentally to think about and design for. People are doing tricks with `calc` now (Nice clip explaining @22mins) but you still need to do touch ups with media queries. Example of mobile first :
.test-class {
// Smallest mobile device (default everything under 640px)
background-color: red;
@media only screen and (min-width: 640px) {
background-color: orange;
}
@media only screen and (min-width: 1200px) {
background-color: yellow;
}
@media only screen and (min-width:…