Recipe Page

Solution retrospective
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?
Please log in to post a comment
Log in with GitHubCommunity 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