@use "sass:math";

@mixin scut-ratio-box (
  $ratio: math.div(1, 1)
) {

  overflow: hidden;
  position: relative;

  // The container's height, as a percentage of the
  // container's width, is set by assigning
  // padding-top to a pseudo-element.
  &:before {
    content: "";
    display: block;
    height: 0;
    padding-top: math.div(1, $ratio) * 100%;
  }

}

%scut-ratio-box {
  @include scut-ratio-box;
}
