Design comparison
Solution retrospective
Tried my hand at initializing CSS variables at the :root
and it went pretty well. Gonna hope to keep that up, but also expand on what's stored there in the future. I think it would be a good place to have different font sizes placed there too. I just didn't get around to it this time.
Once I moved from the mobile first solution to the desktop, everything shifted slightly and I started changing the dimensions of the card container prematurely. I made things smaller, and then when I started updating the fonts to take up more space, the box became to small. So I'm gonna change my strategy next time for sure.
What specific areas of your project would you like help with?I want to know if there are better ways to architect the CSS code. I made multiple classes for the fonts and applied them directly to certain HTML elements, but I think if the only thing that's changing between the classes is the font size, then that should be handled by changing the property on a class, rather than having a class explicitly for it. Thoughts?
Community feedback
- @dylan-dot-cPosted 8 days ago
Well done on the project, it's well structured and formatted.
For the
cardDiscription
div you can make it a p tag, just so it can be seen as a paragraph.For the css, I see you had alot of reset and some unrelated styles for like inputs and stuff, I think you could move all of that into its separate css file, namely
reset(s).css
and import it to your main file using@import
. This can help with separation of concerns as the resets are fully related to the custom styles you wrote and could be reused in other projects.Also in terms of CSS and class architecture, you did it well and your code reminds of the
atomic
styles tailwindCSS uses(I don't know if you know it). So thats good and it could help you to quickly update fonts and font-styles on elements. I normally take a lazy approach to this as I just put the font-family on the body so all elements inherit it, then just used the font weight on the elements that needs a specific one.Anyways good job. Take care!
Marked as helpful1
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