![](https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_900/Screenshots/uq3xhfcdg1tpetrxfy9o.jpg)
Product Preview Card using Tailwind CSS
Design comparison
Solution retrospective
I normally rely on the Figma design file to nail the spacing between elements, but this time without it provided I had to use my best judgment. I believe I did well with the spacing between elements and it looks fairly close to the design.
I also learned about the picture
and source
element from the web.dev resource, and I will continue using it for other projects.
At the custom breakpoint I had set, I noticed that once the layout shifted, that there was a strange gap under the image for the first couple of pixels past the breakpoint before it grew. I noticed it seemed to be due to the text wrapping at the point of the breakpoint. I decided to use the breakpoint to decrease the amount of padding once the layout shifted and it didn't produce the gap between the image and the bottom of the card.
Community feedback
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