This is a solution to the Four card feature section challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- Solution URL: Github repo
- Live Site URL: Live site
- First thing I did was figure out how I would use Grid to achieve the responsive layouts. I used codepen and created the layout and media queries to get a feel for how it would work. I even added a couple extra breakpoints and layouts for fun (one of which made it into my solution). See my codepen here:
- Next I sketched out my html elements structure on a notepad.
- In VS Code I built out the html file.
- Linked my stylesheet, added some boilerplate resets and custom properties.
- Styled the element content (fonts, sizes, colors, etc)
- Built the simple stacked mobile layout.
- Added final details like the box-shadow details
- Tweaked a LOT.
- Semantic HTML5 markup
- CSS custom properties
- CSS Grid
- Mobile-first workflow
I learned Grid a little better, especially how the positioning within columns and rows works.
I also learned that small details can be more complex than I initially figured. The fine colored accent lines on the top of each card was quite tricky for me and I really had to experiment to achieve the result I was after. This is how I did it:
.team-builder {
background: linear-gradient(var(--clr-red) 1%, #ffffff 2%);
}
I'd like to work with Grid some more to start feeling really comfortable with it. I also found the figma file didn't have the same amount of detail as some of the other projects in terms of detailed spacing information. I had to fiddle a lot to try to dial in the layout.
- Josh Comeau's Interactive Guid to Grid - This was fantastic for helping me get a handle on using grid. Super helpful. Thanks, Josh!
- Frontend Mentor - @fish-ladder
Thanks for Kevin Powell for his tutorials on grid!