Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Flexbox NFT Preview Card Component with Svelte + WindiCSS + Vite

svelte
Shawn Lee•600
@OGShawnLee
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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 with GitHub

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License