Design comparison
Solution retrospective
I am used to building the desktop version first and then using media queries to adjust for smaller views but I read that it is better to build from smaller screens upwards. Can someone please explain why if this is true?
Community feedback
- @YazdunPosted about 3 years ago
Hi ! It's better to approach mobile first because
html
elements are mobile responsive by default !Here is a simple example, We have three cards which we need to design them for main page here is how it's gonna look like desktop first :
.card {blah blah blah}
.card__parent { display:flex; justify-content: space-between;}
@media (max-width: 320px) { .card__parent {display:flex; flex-direction:column;}}
now its how gonna look like mobile first:
.card {blah blah blah}
@media (min-width: 768px) { .card__parent {display:flex; justify-content: space-between;}}
as you can see the second step on desktop first approach is unnecessary and it could be done with one line of
media query
with mobile first, I think you get the point nowMarked as helpful0 - @kens-visualsPosted about 3 years ago
Hey @GloriaSekyere 👋🏻
I have some suggestions for the project.
- For the music icon, add
aria-hidden="true”
, because it's for decoration. You can read more aboutaria-hidden
here. Like this :
<img src="images/icon-music.svg" alt="" aria-hidden="true”>
- Also, I suggest adding
transition: all 0.2s;
to the button and the links, this will make:hover
smoother.
I hope this was helpful 👨🏻💻 other than that, you did a great job, keep it up. Cheers 👾
Marked as helpful0@GloriaSekyerePosted about 3 years agoThis is good information. Thanks! @kens-visuals
0 - For the music icon, add
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord