Design comparison
Solution retrospective
Not really happy with my solution and think I need to work on how to better set up a project since I had been just having a lot of problems stemming from how I had done this one. Especially ones related to trying to use CSS variables for too many different html items where it came to bite me in the butt when working on the desktop viewport.
Aside from structural problems, I did find it hard to determine how gradients would work in general and what or where absolute background sections would be or if I would even use them. Same with dropshadow for some of the items in the solution.
Also was curious on how other people did the grid in the bottom. I will be checking out solutions for this project to see mine wasn't 1:1.
Community feedback
- @arogersreneePosted about 1 year ago
Gradients & Drop shadows
Are you using the Figma files? The gradients and box shadows needed are provided with the design. Figma provides the styles when in dev mode.
Bottom Grid
For the bottom portion I used a 12-column grid and positioned the items where I wanted them using
grid-column
.Here's a snippet of the css I used to position the items:
.limitations-card, .limitations-card:last-child { grid-column: span 4;} .section-bmi-limitations > div:nth-child(3) { grid-column: 8 / span 4;} .section-bmi-limitations > div:nth-child(4) { grid-column: 5 / span 4;} .section-bmi-limitations > div:nth-child(6) { grid-column: 3 / span 4; }
I think my HTML and CSS are good. Don't look too much into the JS 😅 Take a look at my solution here: https://www.frontendmentor.io/solutions/body-mass-index-calculator-L_mIraAuz0
Custom Variables Take a look at how I set up my classes and use the custom variables. I think what's making it hard for you is that you are making a unique class for each custom variable. Try making one class and style that using the custom variables. For example:
.limitations-card-heading { font-size: var(--fs-heading-S); font-weight: var(--fw-semibold); line-height: var(--lh-heading); letter-spacing: var(--ls-heading-S); color: var(--clr-gunmetal); }
1
Please log in to post a comment
Log in with GitHubJoin 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