refactor: SimulatorMask use CSS classes

Replace inline style.display with CSS class toggling.

Changes:
- Add .visible class to CSS module
- Use classList.add/remove instead of style.display

(cherry picked from commit 33465bbf520b65908c18d8022f259803253a7621)
This commit is contained in:
linked-danis
2026-03-12 14:09:10 +01:00
committed by Simon
parent 5695b3d6aa
commit 6491118cde
2 changed files with 6 additions and 2 deletions

View File

@@ -7,3 +7,7 @@
display: none;
}
.wrapper.visible {
display: block;
}

View File

@@ -151,7 +151,7 @@ export class SimulatorMask {
this.motion?.start()
this.motion?.fadeIn()
this.wrapper.style.display = 'block'
this.wrapper.classList.add(styles.visible)
// Initialize cursor position
this.#currentCursorX = window.innerWidth / 2
@@ -172,7 +172,7 @@ export class SimulatorMask {
this.#cursor.classList.remove(cursorStyles.clicking)
setTimeout(() => {
this.wrapper.style.display = 'none'
this.wrapper.classList.remove(styles.visible)
}, 800) // Match the animation duration
}