Skip to content

Commit 55752a7

Browse files
committed
disable all animations when prefers-reduced-motion is enabled
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 13203b1 commit 55752a7

4 files changed

Lines changed: 22 additions & 2 deletions

File tree

src/components/AssistantTextProcessingForm.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,11 @@ export default {
892892
> label {
893893
animation: blink 2s infinite;
894894
}
895+
@media (prefers-reduced-motion: reduce) {
896+
> label {
897+
animation: none;
898+
}
899+
}
895900
}
896901
897902
&__provider {

src/components/ChattyLLM/InputArea.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ export default {
188188
font-style: italic;
189189
animation: breathing 2s linear infinite normal;
190190
}
191+
@media (prefers-reduced-motion: reduce) {
192+
:deep(&__thinking > div) {
193+
animation: none;
194+
}
195+
}
191196
192197
&__button-box {
193198
display: flex;

src/components/fields/AudioRecorderWrapper.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ export default {
263263
height: 16px;
264264
flex: 0 0 16px;
265265
border-radius: 8px;
266-
background-color: var(--color-error);
266+
background-color: var(--color-element-error);
267267
}
268268
269269
@keyframes fadeOutIn {
270270
0% {
271271
opacity: 1;
272272
}
273273
50% {
274-
opacity: .3;
274+
opacity: 0.1;
275275
}
276276
100% {
277277
opacity: 1;
@@ -281,6 +281,11 @@ export default {
281281
.fadeOutIn {
282282
animation: fadeOutIn 3s infinite;
283283
}
284+
@media (prefers-reduced-motion: reduce) {
285+
.fadeOutIn {
286+
animation: none;
287+
}
288+
}
284289
}
285290
}
286291
</style>

src/components/fields/TextInput.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ body[dir="rtl"] .choose-file-button {
242242
.shadowed.streaming .rich-contenteditable__input {
243243
animation: pulse 2s infinite;
244244
}
245+
@media (prefers-reduced-motion: reduce) {
246+
.shadowed.streaming .rich-contenteditable__input {
247+
animation: none;
248+
}
249+
}
245250
}
246251
247252
@keyframes pulse {

0 commit comments

Comments
 (0)