6 lines
161 B
JavaScript
6 lines
161 B
JavaScript
|
|
||
|
export function calculateViewportHeightUnit () {
|
||
|
const vh = window.innerHeight * 0.01;
|
||
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
||
|
}
|