Skip to content

Commit

Permalink
Fix bug where checkboxes were broken with prefers-reduced-motion
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Oct 15, 2024
1 parent 9e301d3 commit 688b1a5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/components/primer/alpha/text_field.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,7 @@ input[type='checkbox'].FormControl-checkbox {
mask-repeat: no-repeat;
mask-position: center;

@media screen and (prefers-reduced-motion: no-preference) {
animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */
}
animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */
}

/* extend touch target */
Expand All @@ -636,9 +634,7 @@ input[type='checkbox'].FormControl-checkbox {
visibility: visible;
transition: visibility 0s linear 0s;

@media screen and (prefers-reduced-motion: no-preference) {
animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
}
animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
}

&:disabled {
Expand Down

0 comments on commit 688b1a5

Please sign in to comment.