fbi-cde/crime-data-frontend

View on GitHub
sass/util/_aspect-ratio.scss

Summary

Maintainability
Test Coverage
.aspect-ratio {
  height: 0;
  position: relative;
}

.aspect-ratio--1x1 {
  padding-bottom: 100%;
}

.aspect-ratio--4x3 {
  padding-bottom: 75%;
}

.aspect-ratio--object {
  bottom: 0;
  height: 100%;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 1;
}