Skip to content

Commit d630c5e

Browse files
authored
Merge pull request #35 from criticalmaps/fix/backgroundAnimation
Fix support box animated background
2 parents ba1df02 + 8637b8c commit d630c5e

2 files changed

Lines changed: 13 additions & 18 deletions

File tree

_sass/_layout.scss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,22 @@ body {
489489
top: 0;
490490
width: 100%;
491491
height: 100%;
492+
border-radius: var(--radius-box);
492493
object-fit: cover;
494+
color: var(--color-background-main);
493495
mix-blend-mode: plus-lighter;
494496
opacity: 0.5;
495-
border-radius: var(--radius-box);
496497

497498
@media (prefers-color-scheme: dark) {
498-
mix-blend-mode: plus-darker;
499-
filter: invert(100%);
499+
mix-blend-mode: color-burn;
500+
}
501+
502+
svg {
503+
width: 100%;
504+
height: 100%;
505+
position: absolute;
506+
inset: 0;
507+
pointer-events: none;
500508
}
501509
}
502510

index.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,8 @@ pathName: rootPath
9595
<div class="support-box--value">
9696
<p>Our monthly server costs range from <strong>20</strong> to <strong>60 Euro</strong>, depending on traffic.</p>
9797
</div>
98-
<div class="support-box--background particle-stream" aria-hidden="true">
98+
<div class="support-box--background" aria-hidden="true">
9999
<style>
100-
.particle-stream {
101-
position: absolute;
102-
width: 100%;
103-
height: 100%;
104-
overflow: hidden;
105-
}
106-
.particle-stream svg {
107-
width: 100%;
108-
height: 100%;
109-
position: absolute;
110-
inset: 0;
111-
pointer-events: none;
112-
}
113100
@keyframes movePath {
114101
0% {
115102
offset-distance: 0%;
@@ -147,7 +134,7 @@ pathName: rootPath
147134
rect.setAttribute('class', 'particle');
148135
rect.setAttribute('width', size);
149136
rect.setAttribute('height', size);
150-
rect.setAttribute('fill', 'white');
137+
rect.setAttribute('fill', 'currentColor');
151138
rect.setAttribute('rx', 2);
152139
rect.style.setProperty('--p-opacity', opacity);
153140
rect.style.animationDuration = duration + 's';

0 commit comments

Comments
 (0)