Submitted almost 4 years agoA solution to the Stats preview card component challenge
Stats preview card using Flex/Grid/Media queries
@AdrianX19

Solution retrospective
For some reason I struggled with this one a bit, wanted to achieve the result as close as on the provided designs and ended up with some weird fixed values here and there so it might be improved but my my two biggest issues were
- Changing the black and white picture to be violet - I tried with both 'filter' and 'mix-blend-mode' properties but neither provided me with the result I wanted so I ended up with creating pseudo element on top of the image and gave it some opacity but still the result is not same as on the design - any ideas how to achieve this effect?
- I used img element and struggled to change the src based on the width - I tried with srcset attribute but it didn't work for some reason so I ended up using content: url() in media queries. I probably should have used some div with background-image instead of a img but anyway - any other suggestions how to switch between different images based on the screen width when using img tag?
- I've noticed that my solution's screenshot looks super weird :O any idea why?
Any kind of feedback is super appreciated!
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Adrian H'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