@use "sass:math";
@mixin aspect-ratio($width, $height) {
  aspect-ratio: #{$width}/#{$height};
  @supports not (aspect-ratio: #{$width}/#{$height}) {
    position: relative;

    > * {
      position: absolute !important;
    }

    &::before {
      content: "";
      float: left;
      padding-top: math.percentage(math.div($height, $width));
    }

    &::after {
      clear: both;
      content: "";
      display: block;
    }
  }
}
