Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Three cards layout using pure CSS and flexbox/grid

bem
P
Amaury Franssen•180
@ExploryKod
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I wanted a small and fast project to have fun today and this one was great.

  • I use only pure CSS.

Maintainability:

  • I borrow some tips from BEM without doing full BEM. I only use someting useful for maintainability : separation of css features.
  • I use variables for a better maintainability too : I need only to change these variables.

Design:

  • I try to maintain size to improve the design rule of consistency : I used multiple of 6 (font-sizes) and 8 (white spaces).

Performance:

  • I customize my own reset.css as I didn't want to made useless rules for this project.
  • I may have done css in only one file (for performance reasons) but to better organized css I separate css files and comments to search easily inside css files (with cmd or ctrl+F).

Questions:

  • You can also help me to find a better way to use flexbox and grid: what can be improved ?
  • I try to follow "DRY" but tel me if I can do better.
  • And every other advices for best practices are welcome to improve myself.

I have done nothing for accessibility (aria-label etc.), I can improve this later.

Have a good moment discovering my project. :)

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Amaury Franssen's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2026
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License