Responsive Card Components using Flexbox and Sass (and love)
Design comparison
Solution retrospective
What do you think? I would love to hear some critic on this little component.
Community feedback
- @VCaramesPosted about 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
-
To better identify the main content of you site you will want to encase your entire component inside a Main Element.
-
The Alt Tag Description for the image needs to be improved upon. You want to describe what the image is; they need to be readable. Assume you’re describing the image to someone.
-
This challenges requires the use of two images 🎑 for different breakpoints. The Picture Element will facilitate this.
Here is an example of how it works: EXAMPLE
Syntax:
<picture> <source media="(min-width: )" srcset=""> <img src="" alt=""> </picture>
- The only heading in this challenge is the name of the perfume, “Gabrielle Essence Eau De Parfum” . The rest of the text should be wrapped in a Paragraph Element.
More Info:
https://www.w3schools.com/html/html_images_picture.asp
https://web.dev/learn/design/picture-element/
- The old price 🏷 is not being announced properly to screen readers. You want to wrap it in a Del Element and include a sr-only text explaining that this is the old price.
If you have any questions or need further clarification, let me know.
Happy Coding! 👻🎃
Marked as helpful1@polukarpPosted about 2 years ago@vcarames Thank you so much, this information is very useful for me. I looked up your solution and was really inspired, so I tried to implement some of your features like animations and accessibility 😉 . But I didn't figure out how to make the hover animation revert smoothly after I hover on an image... So if you have any advice on that I'm eager to learn from you again)
0@VCaramesPosted about 2 years ago@polukarp
I'm glad I could help and thank you!
For the image, you can use the
transition
property. You can actually use this property on a lot of things, not just images, e.g., text, containers, buttons, etc...This is how I set mine:
transition: 0.7s ease;
Here is more info about it:
Marked as helpful0 -
- @Nossa1Posted about 2 years ago
Hey mate u did a good job, just try to add an alt attribute to ur image, for example, alt="a drawing of a perfume".
1
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