From 9017dbbf7399f4260e550bb35670da92de230da3 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Wed, 8 Oct 2025 16:01:56 -0500 Subject: [PATCH] exit settings animation --- src/webpage/settings.ts | 6 +++++- src/webpage/style.css | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/webpage/settings.ts b/src/webpage/settings.ts index b298855..9776b95 100644 --- a/src/webpage/settings.ts +++ b/src/webpage/settings.ts @@ -2122,7 +2122,11 @@ class Settings extends Buttons { } hide() { if (this.html) { - this.html.remove(); + const html = this.html; + html.classList.add("bgRemove"); + html.addEventListener("animationend", (e: AnimationEvent) => { + if (e.animationName === "bg-out") html.remove(); + }); this.html = null; } } diff --git a/src/webpage/style.css b/src/webpage/style.css index 9d4997c..7d0b67f 100644 --- a/src/webpage/style.css +++ b/src/webpage/style.css @@ -2785,6 +2785,21 @@ ul { opacity: 1; } } +.bgRemove { + animation-duration: 0.2s; + animation-name: bg-out; + animation-fill-mode: forwards; + animation-timing-function: ease-out; +} +@keyframes bg-out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + transform: scale(1.1); + } +} @keyframes fade-in-back { 0% { opacity: 0; @@ -3080,6 +3095,7 @@ fieldset input[type="radio"] { opacity: 0; } } + .titlediv { height: 100%; }