forked from AkkomaGang/akkoma-fe
components: Honour 'prefers reduced motion' setting in many components
This helps accessibility for motion-sensitive people such as myself, and can improve battery life in "battery saving" mode on most devices
This commit is contained in:
parent
af97dd7484
commit
51ebe643d5
6 changed files with 22 additions and 0 deletions
|
@ -55,6 +55,9 @@
|
||||||
|
|
||||||
.interactive {
|
.interactive {
|
||||||
.svg-inline--fa {
|
.svg-inline--fa {
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
animation: unset;
|
||||||
|
}
|
||||||
animation-duration: 0.6s;
|
animation-duration: 0.6s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,9 @@
|
||||||
box-shadow: var(--panelShadow);
|
box-shadow: var(--panelShadow);
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
transition-duration: 0.25s;
|
transition-duration: 0.25s;
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
z-index: 1001;
|
z-index: 1001;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
|
|
||||||
.interactive {
|
.interactive {
|
||||||
.svg-inline--fa {
|
.svg-inline--fa {
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
animation: unset;
|
||||||
|
}
|
||||||
animation-duration: 0.6s;
|
animation-duration: 0.6s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,10 @@
|
||||||
.side-drawer {
|
.side-drawer {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
transition-timing-function: unset;
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
transition: 0.35s;
|
transition: 0.35s;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
margin: 0 0 0 -100px;
|
margin: 0 0 0 -100px;
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
.emoji:hover {
|
.emoji:hover {
|
||||||
transform: scale(1.4);
|
transform: scale(1.4);
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
transition: 0.05s;
|
transition: 0.05s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,9 @@
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
transition: transform 100ms;
|
transition: transform 100ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +92,9 @@
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
margin-left: 0.6em;
|
margin-left: 0.6em;
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
transition: transform 100ms;
|
transition: transform 100ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue