Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

NFT Preview Card Component Sass

#sass/scss#vite
matryosha 190

@matryosha

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  • Fundamentals are important. Again. When I needed to wrap img in div I could see that for some reason the div was taking more vertical space than the image inside of it and that's totally unlogical and bs but trying to find some info why is that I founded logical explanation: because of display: inline property. More about it here.
  • Used Sass primarily for nesting and more clean variables usage(no var()). Don't know why nesting took so long to implement in main specs but it is coming.
  • Neat trick to use even though it's a little bit clunky:
@media (hover: hover) and (pointer: fine) {
.image:hover {
opacity: 1;
}
}

So the hover will work only on devices with pointer and not in phones.

Community feedback

matryosha 190

@matryosha

Posted

  • Decrease title font size -- ✔
  • Make avatar border width smaller -- ✔
  • Description font size should be bigger --✔
  • Border radius is bigger --✔
0

Please log in to post a comment

Log in with GitHub
Discord logo

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