Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Figma, Grid areas & auto-fit, flex & auto margins, BEM, SASS

#bem#sass/scss
Aymin 180

@ayminahmedpk

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Improved upon my previous solution by using grid.

Loosely used BEM naming convention and the WordPress coding style guide for CSS.

Flex is for card content, Grid is for laying out the cards.

Grid makes markup shorter and simpler. Easier to avoid having container divs for rows/columns compared to using flexbox.

When looking at the CSS, the layout is much easier to understand with Grid, especially with grid-areas in the desktop version.

With grid auto-fit, I was able to have a decent laptop layout as well, without having to specifically develop it, or have a separate breakpoint / file for it.

Figma file is not from FEM but my own work. Makes pixel perfect development easier when you've mapped out the layout first.

Still need to learn box-shadow better.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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