Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Recipe Page

sass/scss, vite
Erratic Enigma•200
@erratic-enigma
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?

This is my first time experimenting with container queries, though I only used them for applying border-radius on the image when the main element reaches certain minimum widths:

@container (width >= 42.875em /* 686px */) {
  border-radius: …
}

Interested to take advantage of them on larger projects in the future.

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

On small viewports, the image fits across the full width of the page, but the rest of the content has whitespace on both sides. I didn't want to use an extra wrapper with padding applied around the content. Instead, I made use of grid with the following columns:

grid-template-columns: [gutter-start] minmax(auto, 1.75rem) [content-start] 1fr [content-end] minmax(auto, minmax(auto, 1.75rem) [gutter-end];

positioned all the content inside of the content column:

main > * { grid-column: content; }

then positioned the image across all available columns:

.opening-image { grid-column: gutter; }
What specific areas of your project would you like help with?

I'm not entirely sure if I structured the markup for the table properly, so any pointers on that would be nice.

I'm also not sure about the way I applied positioning styles to the ul and ol elements. Are there any better methods than using margin and padding?

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 Erratic Enigma'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