Stats preview card component using grid and flexbox
Design comparison
Solution retrospective
Feedback appreciated.
Community feedback
- @danielmrz-devPosted 9 months ago
Hello there! šš½āāļø
Your solution looks excellent!
I have a suggestion about your code that might interest you:
š If you don't have the Figma design files, I recommend using a browser extension called Perfect Pixel.
It allows you to compare your finished project with the design images that come along when you download the project and check the (almost exact) dimensions. It's very useful!
I hope it helps you in future projects! š
Other than that, great job!
Marked as helpful1@MatejBumberaPosted 9 months ago@danielmrz-dev thanks for the tip! I will definitely check it out.
1 - @hassanmoaaPosted 9 months ago
Hello @MatejBumbera
I see you fixed your background problem, well done!
but i see a minor problem that could mess your project if it's bigger and there are more content in it.
p { font-size: 28px }
For the paraghraph it's is better to use rems and ems for margins and paddings but px for this project is no big deal.
-
i see you using pixels for many elements, never use pixels for font-sizes in any element, here's why:
-
Certain font-related CSS properties will render your site completely inaccessible if their value is declared using pixels even once.
Which properties are affected?
All of these properties must never ever be declared in pixels:
- font-size
- line-height
- letter-spacing
If you've used pixels to define any of the above style properties, these will not respect the user's font size preferences!
- You should use ems, and rems for font-sizes would be better.
This article may help:
https://fedmentor.dev/posts/font-size-px/
Other than that you're good, keep up the good work, I also like your idea of using Grid!
Good luck mate.
Marked as helpful1@MatejBumberaPosted 9 months ago@hassanmoaa thanks for the suggestion. I will try to incorporate it into my projects :)
0 -
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