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 9f8ac19 commit 2b792c4Copy full SHA for 2b792c4
src/sketch.js
@@ -48,6 +48,7 @@ function setup() {
48
49
// define canvas dimensions for mobile screens
50
if (window.innerWidth < widthScreen) {
51
+ const root = document.querySelector(':root');
52
root.style.setProperty('--heightScreen', window.innerWidth * (heightScreen / widthScreen) + "px");
53
root.style.setProperty('--widthScreen', window.innerWidth + "px");
54
}
0 commit comments