html, body {
  --ratio: 1;
}

body {
  position: fixed;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}

.full-screen {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

.fixed-ratio {
  background-color: black;
}

.fixed-ratio > * {
  position: absolute;
  width: var(--width);
  height: var(--height);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--ratio), var(--ratio));
}
