Design comparison
Solution retrospective
I always start my projects using a mobile-first approach. For this one, I should've started with the desktop approach instead. The structure really changed, and I had to add more blocks and elements. I didn't like the CSS—it's not maintainable, and I'm not very happy with it. This has me questioning whether I should continue using the mobile-first approach.
What specific areas of your project would you like help with?I'd like to know from the community whether they always use a mobile-first approach or if it varies from project to project, because I'm considering starting with desktop from now on.
Community feedback
- @huyphan2210Posted about 2 months ago
Hi, @mts-ml
I took a look at your solutions and I have some thoughts:
- I'm curious why you opted for a desktop-first approach. Could you share more details on your reasoning?
- While the mobile-first approach is the most common and widely recommended strategy (and one I personally use), it really depends on the project. In my professional experience, it often comes down to the project's requirements, especially if you're not the one initiating the project. People expect websites to be responsive, but there should be a clear scope regarding which devices or viewports we aim to support. It's impossible to accommodate every device, both current and future.
- I agree that managing CSS can be challenging, especially with so many media queries for different viewport widths. The goal should be to write the least amount of code that applies to the widest range of viewports. Responsive design involves more than just media queries. I recommend researching relative units, responsive CSS properties (like
min-width
,max-width
), and CSS functions (min()
,max()
,clamp()
, etc.).
Hope this helps!
Marked as helpful0@mts-mlPosted about 2 months agoHey ,@huyphan2210
I did the mobile version first than the desktop one, in this particularly project, I felt like I should've started doing the desktop design, because I needed to add more
div
and other styles that wasn't required on the mobile.I'll do some more research on CSS, thanks for the feedback!
1@huyphan2210Posted about 2 months ago@mts-ml
In the end, choosing an approach comes down to personal preference.
I still think you can stick with the mobile-first approach.
It might be a lack of deeper understanding of how HTML and CSS work together that made you think the desktop-first approach would be better.
Ultimately, the choice is yours—it’s your code, and exploring different methods is a valuable part of learning. Keep researching HTML and CSS, and make the decision that feels right for you.
Hope this helps!
1
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