We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98531b5 commit 805c8e0Copy full SHA for 805c8e0
packages/kaizen-core/helpers/root-variables/h-root-variables.js
@@ -6,7 +6,7 @@
6
const hRootVariablesHandler = () => {
7
document.documentElement.style.setProperty(
8
'--viewport-width',
9
- `${window.innerWidth}px`,
+ `${document.documentElement.clientWidth}px`,
10
);
11
12
'--viewport-height',
@@ -24,7 +24,7 @@ const hRootVariablesHandler = () => {
24
).unshift();
25
if (body) {
26
hRootVariablesHandler();
27
- ['load', 'resize'].forEach((event) =>
+ ['DOMContentLoaded', 'load', 'resize'].forEach((event) =>
28
window.addEventListener(event, () => hRootVariablesHandler()),
29
30
}
0 commit comments