Compare commits

...

3 Commits

Author SHA1 Message Date
Petar Petrov b279af6856 Apply suggestion from @MindFreeze 2026-07-28 10:50:45 +03:00
Petar Petrov 95be41d56b Update demo/src/html/index.html.template
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2026-07-28 10:44:53 +03:00
Petar Petrov 4331943266 Respect prefers-reduced-motion on the launch screen
The pulsing dots in the loading logomark keep animating under a reduced
motion preference. The logomark is loaded via <img>, so page CSS cannot
reach it; the guard has to live inside the SVG itself.

The launch screen's own fades reference --ha-animation-duration-normal,
but core.globals.ts only applies once the app bundle has loaded, so the
250ms literal fallback was always what took effect. Define the token in
the launch screen styles so the fades, the view transition and the
removal timeout all collapse under a reduced motion preference.
2026-07-28 09:29:36 +03:00
3 changed files with 17 additions and 0 deletions
+6
View File
@@ -47,6 +47,12 @@
html {
background-color: var(--primary-background-color, #fafafa);
color: var(--primary-text-color, #212121);
--ha-animation-duration-normal: 250ms;
}
@media (prefers-reduced-motion: reduce) {
html {
--ha-animation-duration-normal: 1ms;
}
}
@media (prefers-color-scheme: dark) {
html {
@@ -20,6 +20,9 @@
46.153846% { transform: translate(70px, 37.6348px) scale(1.2); animation-timing-function: cubic-bezier(.39, .575, .565, 1); }
69.230769%, 100% { transform: translate(70px, 37.6348px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.dot-left, .dot-right, .dot-top { animation: none; }
}
</style>
<g transform="matrix(.938408 0 0 .93841 -5.688557 -13.572944)">
<path fill="#18bcf2" d="M73.5367 13.0937 106.463 46.0524v.0033C108.41 48.0043 110 51.848 110 54.6007v30.0292c0 2.7527-2.25 5.0049-5 5.0049l-70-.0034c-2.75 0-5-2.2522-5-5.0048V54.5974c0-2.7527 1.5933-6.5998 3.5367-8.545l32.93-32.9587c1.9433-1.9452 5.1266-1.9452 7.07 0Z" transform="matrix(1.598452 0 0 1.598452 -41.89164 -.937304)"/>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

+8
View File
@@ -28,6 +28,14 @@
font-weight: 400;
font-style: normal;
}
html {
--ha-animation-duration-normal: 250ms;
}
@media (prefers-reduced-motion: reduce) {
html {
--ha-animation-duration-normal: 1ms;
}
}
@keyframes fade-out {
from {
opacity: 1;