Flexbox NFT Preview Card Component with Svelte + WindiCSS + Vite
Design comparison
Solution retrospective
What's up folks!
Thanks to this challenge I learnt a cool trick using WindiCSS for the view element that appears when hovered over the main image. First I set it to hidden and when hovering I set it to inline and works perfectly. Issue was adding a transition; cannot transition a display state, so I came up with a quick solution of ditching the preview method and playing with opacity and pointer events, and it just worked with few classes! I love WindiCSS even more now!
PS: I kept the original approach since it requires less classes and I kinda like the instant appearance more.
Any feedback is welcome. Thanks for viewing/replying! Have a good one!
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