Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

Stats Preview Card Using Component using SASS initialized with Nodejs

sass/scss, node
P
Jan•170
@Negligence
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Do you know of any other functions that you personally use to make life easier? I really had fun creating a simplified SASS file here for convenience functions. The absence of partials is as intended because of the simplicity of this challenge so I would like to receive any feedback aside from that.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Jan•170
    @Negligence
    Posted almost 3 years ago

    Do you guys have other alternatives for accurately getting the image to have the exact same color filter as the design? Although I'm already plenty content with the output from my solution, but it's not quite the same as the design and it won't hurt to try learning from other methods.

    For context, I used a ::before pseudo-element and blended the image with the mix-blend-mode property. This yielded better results in my opinion, but it came at the cost of trial-and-error -- trying out every mix-blend-mode value available to find the best results. 😅

    &::before {
        grid-area: img;
        justify-self: normal;
        content: '';
        background-color: var(--accent-color);
        mix-blend-mode: multiply;
      }
      
      > img {
        grid-area: img;
        height: rem(240px);
        object-fit: cover;
      }
    

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

Oops! 😬

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

Log in with GitHub