Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Recipe Page

bem
P
Dallas•160
@Dasaru
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Everything mainly went smoothly when doing this project. I am not too experienced when using the CSS BEM (block-element-modifier) methodology. So trying to figure out which parts I should make a block and which ones elements was something I had to think about.

What challenges did you encounter, and how did you overcome them?

There were two main challenges:

First, I had problems with my margins not properly collapsing. One thing that I have learned when I first started learning CSS is that vertical margins collapse. So I was confused when my vertical margins were not collapsing despite not having any padding or borders between the two elements. It turns out that in flexbox and CSS grid vertical margins don't collapse.

The second problem that I ran into was properly linking my font files in github pages. The problem I ran into was that I was using absolute pathing instead of relative. So it was checking my files located from the github domain instead of from where my project path starts.

What specific areas of your project would you like help with?

I would be grateful for any advice or tips on how to organize my CSS using BEM and what I could do differently.

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 Dallas'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 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License