Stats Preview Card | SCSS, mobile first, responsive image
Design comparison
Solution retrospective
I had a hard time finding a proper way for the colored overlay on the image. What is your best solution for that? It's hard to get close to the design.
Any feedback welcome!
Thank you.
Community feedback
- @Enmanuel-Otero-MontanoPosted over 2 years ago
Hello @gmagnenat! Congratulations for your solutions.
There are a couple of ways to do the color overlay on the image, but this is the best:
filter: opacity(.6) drop-shadow(0 0 0 hsl(277, 64%, 61%));
Espero haberte ayudado
Cheers!
1@gmagnenatPosted over 2 years agoHey @Enmanuel-Otero-Montano ! Thank you for your comment.
I will try this filter combination. I haven't thought about the drop shadow here.
Thanks for the tip!
0 - @correlucasPosted over 2 years ago
Hello Gwenaël! Congratulations for you challenge solution!
You did a good job with this solution, everything seems fine. The only this is slight different is the image color you can fix it playing with the opacity and the background color.
Or you can use a shortcut using the propert
mix-blend-modes
and apply the multiply or overlay filter. The following code should fix your solution:.card__illustration :after { mix-blend-mode: multiply; opacity: 0.75; }
But note that the background purple color should be inside another element to be affected by the opacity property. Try to apply the background-color inside the right column of the container.
I hope it helps you, happy coding.
1@gmagnenatPosted over 2 years agoHey Lucas, thanks for your comment! Good catch with the background color. I will try your solution.
1
Please log in to post a comment
Log in with GitHubJoin 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