Skip to content

best way to save what you love

web/DialogHolder: improve first animation performance, prevent lag

wukko926008818ee0
diff --git a/web/src/components/dialog/DialogHolder.svelte b/web/src/components/dialog/DialogHolder.svelte
index 92e4253b..b519340d 100644
--- a/web/src/components/dialog/DialogHolder.svelte
+++ b/web/src/components/dialog/DialogHolder.svelte
@@ -85,6 +85,8 @@
-webkit-backdrop-filter: blur(7px);
opacity: 0;
+
+ will-change: opacity;
transition: opacity 0.2s;
}
@@ -105,19 +107,21 @@
align-items: center;
background: var(--popup-bg);
- box-shadow:
- 0 0 0 2px var(--popup-stroke) inset,
- 0 0 60px 10px var(--popup-bg);
+ box-shadow: 0 0 0 2px var(--popup-stroke) inset;
border-radius: 29px;
+ filter: drop-shadow(0 0 40px var(--button));
+
padding: var(--dialog-padding);
position: relative;
- will-change: transform;
+ will-change: transform, opacity, filter;
}
:global(dialog.open .dialog-body) {
animation: modal-in 0.35s;
+ animation-delay: 0.06s;
+ animation-fill-mode: backwards;
}
:global(dialog.closing .dialog-body) {
@@ -151,11 +155,11 @@
transform: scale(0.8);
opacity: 0;
}
- 30% {
+ 35% {
opacity: 1;
}
50% {
- transform: scale(1.005);
+ transform: scale(1.01);
}
100% {
transform: scale(1);
@@ -181,7 +185,7 @@
1% {
transform: translateY(200px);
}
- 30% {
+ 35% {
opacity: 1;
}
50% {