Design comparison
Solution retrospective
I used the built-in Tailwind CSS utility classes, so my solution isn't pixel-perfect. This was intentional to keep it simple. However, I did use the custom Outfit font.
Next time, I would try to create some custom Tailwind classes to match the project spec better (colours, font size and line height).
What challenges did you encounter, and how did you overcome them?None. The project was straightforward.
What specific areas of your project would you like help with?The classes I used to layout the card seemed to work, but perhaps there is a better/cleaner approach?
Community feedback
- @geomydasPosted 2 months ago
Hi @jboys, I have recently just finished reading your code and it looks good but it has some few issues
- Apply the styles of the first div in the body element. No need to use a wrapper div here
- Don't set fixed widths such as
w-80
orh-96
. Doing so will prevent the element from shrinking causing unresponsivness and overflow issues. Trymax-w-80
paired withw-full
instead. - Remove the third wrapper div and apply the paddings on the second wrapper div itself
- Remove the wrapper div that contains the heading and the paragraph. You can just apply the
m-t
on the heading. There is no need for the padding for both of the elements and you can just directly apply the padding on the paragraph element. - Consider self hosting your fonts. Using google fonts and linking their API is slower since you still have to connect to an external server plus it is also a privacy issue as it breaks GDPR. I use this handy tool for helping me self host the fonts.
- Add the colors provided in the
style-guide.md
file inside your tailwind.config.js instead of using the pre-made color palette provided by Tailwind in order to follow the design
That's all and don't be overwhelmed. You can do one bullet at a time. Have a nice day and have fun coding!
Marked as helpful0
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