Design comparison
SolutionDesign
Solution retrospective
How can I improve my CSS hover states and positioning?
Community feedback
- @pradeeps4iniPosted over 2 years ago
Hello, Justin.
You've done a great job on implementing the design.
- You can create utility classes in CSS to not write the same code again. For example: you're using "display: flex;" on multiple elements. You could create a class...
.flex { display: flex; }
and use "class="flex"" on elements where you want to use flexbox.
- I wrote a demo code to show how you can also use pseudo elements to create an overlay on hover. You can modify and i hope you can learn something from it. https://codepen.io/pradeeps4ini/pen/yLKbRqB
Marked as helpful1@justinnveraPosted over 2 years ago@pradeeps4ini Thanks Pradeep! I will implement custom CSS properties in my next project. That definitely saves a lot of time and code especially for larger projects. Thanks for the feedback!
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