Stats Preview Card Using Utility Classes and semantic HTML

Solution retrospective
Hello everyone, I would like some feedback on the HTML markup and whether if there is a better way I could have approached the spacing/breaking the sentences to how it looks on the design. Is there anything you would have done differently?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @AbhijitSarode
Hi Farzeen,
Your code seems well written but since there is just one component I think <main> would suffice instead of <article>
You are already using global variables for colors so instead of just mentioning the values of colors you can mention them as hsl, RGB or hex colors, It becomes little easier to use especially when intellisense doesn't work as expected
When it comes to setting values for three different scenarios(or screen sizes) I think 'clamp()' gets the job done that way you don't have to mention it separately in media query
Btw you have <body> tag declared at two different places, I don't think it's a good practice to redeclare <body> tag so do look into it.
Instead of using precise percentage on width you can use 'calc()' and let CSS do the calculation work for you
Hope this helps
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