Hi, I often set images as backgrounds, especially when I need specific ratio, maybe mixin for that can look something like this
.thumb-image {
@util bg-image(/assets/images/awesome-image.jpg);
}
.thumb-image {
background-image: url(/assets/images/awesome-image.jpg);
background-position: center;
background-size: cover;
}
Or maybe in combination with aspect-ratio mixin
.thumb-image {
@util aspect-ratio(16:9);
@util bg-image(/assets/images/awesome-image.jpg);
}
Hi, I often set images as backgrounds, especially when I need specific ratio, maybe mixin for that can look something like this
Or maybe in combination with aspect-ratio mixin