Skip to content

Commit 39ebd5c

Browse files
committed
fix: prevent scrollbars caused by moving snowflakes
Thanks to @jacopotediosi for the suggested fix Closes #1
1 parent d570173 commit 39ebd5c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

octoprint_wrapped/static/pure-snow/pure-snow.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#snow {
2+
position: absolute;
3+
top: 0;
4+
left: 0;
5+
width: 100%;
6+
height: 100%;
7+
overflow: hidden;
8+
pointer-events: none;
9+
z-index: 32767;
10+
}
11+
112
.snowflake {
213
z-index: 32768;
314
position: absolute;

octoprint_wrapped/static/pure-snow/pure-snow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ function getRandomArbitrary(min, max) {
8888

8989
// Create style for snowflake
9090
function generateSnowCSS(snowDensity = 200) {
91+
document.getElementById("snow").style.height = `${pageHeightVh}vh`;
92+
9193
let snowflakeName = "snowflake";
9294
let rule = baseCSS;
9395

0 commit comments

Comments
 (0)