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

NFT Preview Card Component

sass/scss
Prabu•150
@reallyUndefined
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hey everyone,

Please do give your feedbacks and suggestions, they are welcome. 😊✌️

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Hamzat Lawal•560
    @EngineerHamziey
    Posted almost 3 years ago

    Hello there you have done a great job, I'll think:

    • the card need some margin-top and bottom because of short screens(in height) like mobile landscape, it almost enter the edge of the browser on landscape.
    • including the word "image" in your image alt attribute is like repetition because screen readers reads it as image already once they notice the img tag and that will make it say image twice.
    • and also images that are only meant for decoration do not need alt attribute, you can just add an empty alt like: alt=""
    • awwwn 😁 you used SCSS you are a hero 😂😂😂 since you using SCSS, you already have the power and you are strong enough to ignore that ugly stressful CSS variables 😆 also you don't need to declare it in the :root. now your code should look like this:
    /* 
    and once you declare it up here, it is is global, you can use it anywhere below it
    even in your partials(you will just have to import the partials below the variables )
    */
    $color-soft-blue: hsl(215, 51%, 70%);
    $color-cyan: hsl(178, 100%, 50%);
    $color-cyan-with-opacity: hsl(178, 100%, 50%, 0.5);
    $color-very-dark-blue-main-bg: hsl(217, 54%, 11%);
    $color-very-dark-blue-card-bg: hsl(216, 50%, 16%);
    $color-very-dark-blue-line: hsl(215, 32%, 27%);
    $color-white: hsl(0, 0%, 100%);
    /*notice the way i use/call the variable below
    one of the sweetest thing about SCSS variable is that, it doesn't compile to variable in
    your CSS it instead replate the variables with the values*/
    
    body {
      min-height: 100vh;
      font-family: "Outfit", sans-serif;
      background-color: var($color-very-dark-blue-main-bg);
      color: var($color-soft-blue);
      padding-inline: 1.5rem;
      display: grid;
      place-items: center;
    }
    

    I hope you found this ver helpful 😊😁 Happy coding 😊😁

  • Lucas 👾•104,160
    @correlucas
    Posted almost 3 years ago

    👾Hello again Prabu, congratulations for your new solution!

    😎 I saw your preview site and I liked a lot the work you’ve done here, it's almost complete, I’ve some suggestions you can consider applying to your code:

    1.You can create a media query to save space in the pricing section to make each information in a different row. Here’s the code for this media query.

    @media (max-width: 350px) {
    main>.nft-details {
        display: flex;
        flex-direction: column;
    }
    }
    

    2.The value you’ve used for the shadow make it too much dark and strong, to create a smooth shadow you need to give it less opacity and more blur try this value for example:

    main {
        box-shadow: rgb(0 0 0 / 0%) 0px 24px 38px, rgb(0 0 0 / 4%) 0px 20px 20px;
    }
    

    ✌️ I hope this helps you and happy coding!

  • Daud Ismail Olakunle•20
    @Eminentdio
    Posted almost 3 years ago

    I admire your work, bro. I really wish I could be a guru like you.

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
Frontend Mentor logo

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

Frontend Mentor

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub