Responsive Single Price Grid Component using ONLY grids

Solution retrospective
As the title implies that it's the component is a "grid", I chose to do the whole challenge while only using grid
to organize item position. It was a little tougher than I was expecting (as I often rely on flexbox
), but I think it was worth it.
I designed the whole thing to be mobile-first. After some experimenting, the natural spot to expand into the desktop version was around 700px. I learned to span the top row by two using grid-column: 1 / span 2
, and modifying the grid
(template) into a 2x2 box as opposed to solely making the grid-auto-flow: column
.
From there, everything else just fell into place. I'm used to using clamp() at this point to play with font-sizes without needing to call them again in the media queries. I also challenged myself to NOT use px
units whatsoever.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Gabriel Montplaisir'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