Handle prefers-reduced-motion

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-09-21 17:42:23 +02:00
parent 7022ab4f8a
commit afdec1971f
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D

View File

@ -34,27 +34,12 @@ limitations under the License.
transition: opacity 300ms ease; transition: opacity 300ms ease;
} }
@keyframes mx--anim-pulse { @keyframes mx--anim-pulse {
0% { opacity: 1; } 0% { opacity: 1; }
50% { opacity: 0.7; } 50% { opacity: 0.7; }
100% { opacity: 1; } 100% { opacity: 1; }
} }
@media (prefers-reduced-motion) {
@keyframes mx--anim-pulse {
// Override all keyframes in reduced-motion
}
.mx_rtg--fade-enter-active {
transition: none;
}
.mx_rtg--fade-exit-active {
transition: none;
}
}
@keyframes mx_Dialog_lightbox_background_keyframes { @keyframes mx_Dialog_lightbox_background_keyframes {
from { from {
opacity: 0; opacity: 0;
@ -64,7 +49,6 @@ limitations under the License.
} }
} }
@keyframes mx_ImageView_panel_keyframes { @keyframes mx_ImageView_panel_keyframes {
from { from {
opacity: 0; opacity: 0;
@ -73,3 +57,24 @@ limitations under the License.
opacity: 1; opacity: 1;
} }
} }
@media (prefers-reduced-motion) {
@keyframes mx--anim-pulse {
// Override all keyframes in reduced-motion
}
@keyframes mx_Dialog_lightbox_background_keyframes {
// Override all keyframes in reduced-motion
}
@keyframes mx_ImageView_panel_keyframes {
// Override all keyframes in reduced-motion
}
.mx_rtg--fade-enter-active {
transition: none;
}
.mx_rtg--fade-exit-active {
transition: none;
}
}