No particles when prefers-reduced-motion (#25029)

This commit is contained in:
karwosts 2025-04-12 23:56:02 -07:00 committed by GitHub
parent 33735abfb0
commit 63f4cc456c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -265,7 +265,10 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
);
}
if (window.innerWidth > 450) {
if (
window.innerWidth > 450 &&
!matchMedia("(prefers-reduced-motion)").matches
) {
import("../resources/particles");
}

View File

@ -220,7 +220,10 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
this.addEventListener("onboarding-progress", (ev) =>
this._handleProgress(ev)
);
if (window.innerWidth > 450) {
if (
window.innerWidth > 450 &&
!matchMedia("(prefers-reduced-motion)").matches
) {
import("../resources/particles");
}
makeDialogManager(this, this.shadowRoot!);