Object-fit

How to use it

_partial.scss

@use "sailorcss" as s;

.element {
   @include s.object-fit(cover, center center);
}

Compiled CSS

_partial.scss

.element {
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center center;
}

Mixin arguments

@include s.object-fit($fit, $position)

$fit

Value : fill contain cover none scale-down

$position (optionnal)

Position : Any position value ( center center, center left, center right, etc. or percentage ). See object-position for documentation.