Design comparison
Solution retrospective
I'm particularly proud of implementing a truly responsive design with two distinct layouts for mobile and desktop views. The way I utilized CSS Grid for the desktop layout with a 4x12 grid system allowed for a complex yet organized arrangement of content blocks, while the mobile version maintains readability and visual appeal with a simpler flowing layout. I'm also pleased with the consistent color scheme implementation using HSL values, which made it easier to maintain visual harmony across different sections. For future projects, I would: Start with a more structured CSS architecture, perhaps using BEM methodology, to make the code more maintainable Implement CSS custom properties (variables) for colors and spacing to reduce repetition Consider adding subtle animations or transitions between view states Work on reducing some of the repeated CSS code, particularly in the mobile view classes Add more semantic HTML elements instead of relying heavily on div elements Consider implementing a more accessible design with proper ARIA labels and better keyboard navigation
What challenges did you encounter, and how did you overcome them?The biggest challenge was implementing the complex grid layout that needed to maintain visual harmony across different viewport sizes. Initially, I struggled with elements either overlapping or leaving unwanted gaps when resizing the browser. I overcame this by:
Taking a step back and planning the grid structure on paper first, mapping out the exact columns and rows (4x12 grid) needed for the desktop layout Implementing a "display: none" switching strategy between desktop and mobile layouts rather than trying to force one layout to transform into another, which gave me better control over the presentation Learning to effectively use CSS Grid's fractional units (fr) and grid-template-rows/columns to create a flexible yet stable layout
Another significant challenge was managing the responsive imagery within each grid cell. Images would sometimes break the layout or become distorted. I solved this by:
Setting appropriate width constraints on images relative to their containers Using text-align and padding strategically to position images without disrupting the grid structure Implementing different image sizes for mobile vs desktop views
Managing consistent spacing and alignment across all the grid cells was also tricky. I addressed this by:
Creating standardized padding patterns for different types of content cells Using CSS nesting to maintain consistent styling within each box type Carefully planning the typography scale to maintain readability across different screen sizes
What specific areas of your project would you like help with?The CSS Grid.
Community feedback
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