-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.scss
38 lines (26 loc) · 1014 Bytes
/
style.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Particle animations (Compiled from SCSS) */
.particle {
position: absolute;
border-radius: 50%;
}
@for $i from 1 through 30 {
@keyframes particle-animation-#{$i} {
100% {
transform: translate3d((random(90) * 1vw), (random(90) * 1vh), (random(100) * 1px));
}
}
.particle:nth-child(#{$i}){
animation: particle-animation-#{$i} 120s infinite;
$size: random(15) + 10 + px;
height: $size;
width: $size;
/* Delay between spawns */
animation-delay: random(100) * .1s;
/* Sets the particle to a random opacity between around 0.30 and 0.70 */
opacity: (random(40) + 30) / 100;
/* Translation only showing in the viewport width */
transform: translate3d((random(90) * 1vw), (random(90) * 1vh), (random(100) * 1px));
/* Random blue-ish particle colors */
background: hsl(random(100) + 185, 70%, 50%);
}
}