/* -----------------------------------------------------------------------------
 * RATIOS
 */


@mixin ratio($_ratio: 1) {
  position: relative;

  &::before {
    display: block;
    width: 100%;
    padding-top: $_ratio * 100%;
    content: "";
  }
}

@mixin ratio-override($_ratio) {
  &::before {
    padding-top: $_ratio * 100%;
  }
}

@mixin ratio-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

// Unsets

@mixin ratio-unset {
  position: inherit;

  &::before {
    display: inherit;
    width: auto;
    padding-top: inherit;
    content: inherit;
  }
}

@mixin ratio-content-unset {
  position: inherit;
  top: auto;
  left: auto;
  height: auto;
  width: auto;
}
