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

Four card feature section

#accessibility#lighthouse

@Rock-n-Roll-CRC

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


Hi there πŸ‘‹, I’m Danil and this is my solution for this challenge. πŸš€

⚑ Performance:

  • 90%-100% on lighthouse report and PageSpeed Insights. πŸ†
  • W3C html validity checker (0 errors, 0 warnings). πŸŽ‰
  • Axe Dev Tools (Only color-contrast issue). β™Ώ
  • Zooming checked. πŸ”Ž

πŸ”₯ Features:

  • Responsive design. πŸ“±
  • Near-perfect matching design. πŸ”₯
  • Readable code with comments. πŸ‘¨β€πŸ’»

❓ Help:

  • Is my website accessible? πŸ’‘
  • Is there any way I could add some more semantics to my HTML? 🚧
  • Is my CSS good? πŸ“–

πŸ› οΈ Built With:

  • Semantic HTML5 markup. βœ”οΈ
  • Flexbox. βœ”οΈ
  • CSS Grid. βœ”οΈ
  • Media queries. βœ”οΈ
  • Mobile-first workflow. βœ”οΈ

πŸ‘¨β€πŸ’» Languages Used:

  • HTML. βš™οΈ
  • CSS (Vanilla). 🎨

Any suggestions on how I can improve and reduce unnecessary code are welcome!

Thank you. πŸ”₯

Community feedback

Thomas Hertogβ€’ 715

@thomashertog

Posted

This is already looking very good, as well visually like the design given as in the code.

Some small improvements you could make however (in no particular order)

  • outside of a main element you don't use semantic elements (you could argue that the introduction at the top of the page is a <header>
  • it feels very weird to have a title at the top that is not a heading (and then the titles of the cards being <h2>), so I'd fix this by making your .introduction into a <header> with an <h2> for the .introduction-slogan and a <p> for the .introduction-description
  • the icons in the cards are added as background-images requiring you to write all sorts of positioning logic in the background position as well as need to accomodate extra padding in the HTML. I feel (but this is my personal opinion and don't know if it's necessarily better) this would be better if they were in the HTML (though hidden for assistive tech because they're clearly decorative and don't add any meaning).
  • working with grid-template-rows: repeat(4, 1fr) feels a bit squishy since now all your rows will have the same height. That would be bad if one of the cards contained longer content, you might be able to "fix" it with min-height on the cards
  • for a small project like this, it's less relevant, though you might improve on maintainability and/or readability in CSS by working with custom properties (especially for all the colors)
  • you could also have a border-top property on .card switching only the border-top-color on every card itself for better reusability (only need to change border-width in 1 place)
  • the design feels a bit weird around the breakpoint, personally (though i don't know if I did it in my own attempt) I'd add another breakpoint for a 2-column layout

Overall, this is already a very nice attempt, keep going and improving

Marked as helpful

1

@Rock-n-Roll-CRC

Posted

@thomashertog Thank you for your feedback, I appreciate it! πŸ”₯

0

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