Object-fit

How to use it


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

Mixin arguments

The mixin needs 2 arguments when you use it with include.

@include 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.

Return value


  width: 100%;
  height: 100%;
  object-fit: // your $fit value
  object-position: // your $position value - optionnal