Design comparison
Solution retrospective
Hi, this is my solution for the Ecommerce project, I didn't take the time to make it responsive between 768px - 1350px, but other than that it works.
- The accessibility bugs are from the react-modal / react-burger-menu dependencies. A bit annoying.
- In this project I had to change the color of SVGs on hover, but that ended up being quite annoying so I've created a component with the SVG and changed the
stroke
color from there. Does anyone know of a simpler solution?
Thanks and any other feedback is also welcome!
Community feedback
- @KemoravePosted almost 2 years ago
Hello there i also ran into the same problem with svg images and found this plugin to be very useful see vite-plugin-svgr (am using vite but with webpack its already there i think) it can create react components from svg images automatically and all you need to do is apply the fill when using it. Also Remember to remove the fill property from the path tag in the svg file and set it to current. Hope this helps
Marked as helpful0@EduardIonescuPosted almost 2 years ago@Kemorave Thank you, I'll try it next time!
0 - @john0groundPosted almost 2 years ago
Hey man, regarding on your svgs, you'll just have to copy the svg element to the html and change the 'fill' attribute to 'none'.
Then change the 'fill' as a property in css supported with your class-name.
<svg class="cart" fill ="none" /> .cart { fill: #ccc } .cart:hover { fill: #fff }
On the "previous" and "next" icon, the component relied on the border so you will have to change the "stroke" instead of "fill". Hope it helps
0@EduardIonescuPosted almost 2 years ago@john0ground Yes, I ended up doing something similar. Thank you anyway!
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