This is a solution to the Stats Preview Card Component Challenge on Frontend Mentor.
Users should be able to:
- View the optimal layout depending on their device's screen size
- Solution URL: https://www.frontendmentor.io/solutions/stats-card-component-using-bem-and-scss-Xoknc8IAa
- Live Site URL: https://kens-visuals.github.io/stats-preview/
- Semantic HTML5 markup
- SCSS custom properties
- CSS Flexbox
- Mobile-first workflow
.card__gradient-overlay {
position: relative;
&::after {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: $color-primary--light;
mix-blend-mode: multiply;
opacity: 0.9;
}
}
.card__img {
width: 100%;
height: 100%;
object-fit: cover;
}
- impressivewebs - This website helped me to get some idea of how to add a color overlay on an image.
- mix-blend-mode - This CSS property helped me to achieve the desirable result of getting as close to the original design as possible.
- Frontend Mentor - @kens-visuals
- Codewars - @kens_visuals
- CodePen - @kens-visuals