Skip to content

Commit 46038c6

Browse files
committed
fix sass warnings
1 parent 6cafc8b commit 46038c6

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/root.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1+
@use 'sass:math';
12
$d: 70; // density
23
$w: 1200; // grid size
3-
$s: 5s; // speed
4-
4+
$s: 5s; // speed
55
// Generate the snow image using radial gradients
66
$grad: ();
77
@for $i from 0 to $d {
8-
$v: random(4) + 2;
9-
$a: random(5) * .1 + .5;
8+
$v: math.random(4) + 2;
9+
$a: math.random(5) * .1 + .5;
1010
$grad: $grad, radial-gradient(
1111
$v+px $v+px at
12-
(random($w - $v * 2) + $v)+px
13-
(random($w - $v * 2) + $v)+px,
12+
(math.random($w - $v * 2) + $v)+px (math.random($w - $v * 2) + $v)+px,
1413
rgba(255,255,255,$a) 50%,
1514
rgba(0,0,0,0)
1615
) !global;
@@ -39,7 +38,7 @@ html {
3938
content: "";
4039
}
4140
.snow:after {
42-
margin-left: -$w/3 + px;
41+
margin-left: calc(-1 * $w / 3) + px;
4342
opacity: .4;
4443
animation-duration: $s*2;
4544
animation-direction: reverse;
@@ -48,7 +47,7 @@ html {
4847
.snow:before {
4948
animation-duration: $s*3;
5049
animation-direction: reverse;
51-
margin-left: -$w/2 + px;
50+
margin-left: calc(-1 * $w / 2) + px;
5251
opacity: .65;
5352
filter: blur(1.5px);
5453
}

0 commit comments

Comments
 (0)