Skip to content
Submitted almost 4 years ago

Flexbox NFT Preview Card Component with Svelte + WindiCSS + Vite

svelte
Shawn Lee600
@OGShawnLee
A solution to the NFT preview card component challenge

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!

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Shawn Lee’s solution.

Join 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