Set viewport height

Javascript:

function setViewPortHeight() {
  let vh = window.innerHeight * 0.01;
  document.documentElement.style.setProperty('--vh', `${vh}px`);
}
setViewPortHeight();
window.addEventListener('resize', setViewPortHeight);

CSS:

.min-h-screen {
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
}

.max-h-screen {
  max-height: 100vh;
  max-height: calc(var(--vh, 1vh) * 100);
}

.h-screen {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}