@shopgate/engage
Version:
Shopgate's ENGAGE library.
3 lines • 421 B
JavaScript
import{setCSSCustomProp}from"./cssCustomProperties";/**
* Sets the current (real) viewport height to the --vh custom property.
*/export var setViewportHeight=function setViewportHeight(){var vh=window.innerHeight*0.01;setCSSCustomProp('--vh',"".concat(vh,"px"));setCSSCustomProp('--vh-80','calc(var(--vh) * 80)');setCSSCustomProp('--vh-90','calc(var(--vh) * 90)');setCSSCustomProp('--vh-100','calc(var(--vh) * 100)');};