Skip to content

Commit 3611f9c

Browse files
authoredOct 15, 2024··
Fix bug where checkboxes were broken with prefers-reduced-motion (#3152)
1 parent cc1ce7a commit 3611f9c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed
 

‎.changeset/tough-actors-wait.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/view-components": patch
3+
---
4+
5+
Fix bug where checkboxes were broken with prefers-reduced-motion

‎app/components/primer/alpha/text_field.pcss

+2-8
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,7 @@ input[type='checkbox'].FormControl-checkbox {
609609
mask-size: 75%;
610610
mask-repeat: no-repeat;
611611
mask-position: center;
612-
613-
@media screen and (prefers-reduced-motion: no-preference) {
614-
animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */
615-
}
612+
animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */
616613
}
617614

618615
/* extend touch target */
@@ -637,10 +634,7 @@ input[type='checkbox'].FormControl-checkbox {
637634
&::before {
638635
visibility: visible;
639636
transition: visibility 0s linear 0s;
640-
641-
@media screen and (prefers-reduced-motion: no-preference) {
642-
animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
643-
}
637+
animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
644638
}
645639

646640
&:disabled {

0 commit comments

Comments
 (0)
Please sign in to comment.