Design comparison
Community feedback
- @VCaramesPosted about 2 years ago
Hey @salsod-star, great job on this project!
To help keep your CSS code organized and easier to use, I suggest implementing CSS Variables. This will come in handy when building large websites, using light/dark mode, etc…
It’ll look something like this:
:root { --primary-color: value; --secondary-color: value; --tertiary-color: value; }
And to use the variables you’ll use the var() function. So it’ll look like this.
h1 { color: var(—primary-color); }
Heres are some articles regarding CSS Variables.
You can also take a look at my projects and see how I use it.
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
https://www.w3schools.com/css/css3_variables.asp
Happy Coding!
Marked as helpful0 - @correlucasPosted about 2 years ago
👾Hello @salsod-star, congratulations on your first solution!👋 Welcome to the Frontend Mentor Coding Community!
Nice code and nice solution! You did a good job here putting everything together. I’ve some suggestions for you:
1.Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, and making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
2.To reduce your CSS file and improve the performance of loading your page you can use a tool called
CSS minify
that reduces the CSS code by removing the unnecessary characters. You can use aVSCode
plugin calledminify css
or this website tool to reduce your code:https://www.toptal.com/developers/cssminifier
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @denieldenPosted about 2 years ago
Hi Salsod, congratulations on completing the challenge, great job! 😁
Some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of images - use
min-height: 100vh
instead ofheight
, otherwise the content is cut off when the browser height is less than the content
Hope this help! Happy coding 😉
Marked as helpful0@salsod-starPosted about 2 years ago@denielden thanks a bunch, I will make the necessary changes to it
1 - add
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