Thats why I said , not entirely accurate, if we use your contrived example, then you are right.
But if you are ought to use a container for your desktop app, you will end up using something like max-width anyway. So you dont double up on your css. Max width will be much needed in any case.
True, though by using max-width you are already using the default behaviour of the browser. Again, contrived example.
But how about for more complex layouts like a sidebar and main content within that container, or a complex grid layout. I've worked with migrating a codebase from desktop-first to mobile-first, and I can tell you firsthand that you end up with far less CSS, that's all I'm getting at here.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
thanks for the reply and the example.
Thats why I said , not entirely accurate, if we use your contrived example, then you are right.
But if you are ought to use a container for your desktop app, you will end up using something like max-width anyway. So you dont double up on your css. Max width will be much needed in any case.
desktop first:
.hero-card {
max-width: 500px
}
@media(max-width: 500px) {
// nothing
}
And mobile first:
@media(min-width: 500px) {
.hero-card {
max-width: 500px;
}
}
in both cases, we need max-width
True, though by using max-width you are already using the default behaviour of the browser. Again, contrived example.
But how about for more complex layouts like a sidebar and main content within that container, or a complex grid layout. I've worked with migrating a codebase from desktop-first to mobile-first, and I can tell you firsthand that you end up with far less CSS, that's all I'm getting at here.