Skip to content

Commit

Permalink
Remove animations on actionlist checkmark (#2527)
Browse files Browse the repository at this point in the history
Co-authored-by: Katie Langerman <[email protected]>
Co-authored-by: Jon Rohan <[email protected]>
  • Loading branch information
3 people authored Jan 31, 2024
1 parent 1259249 commit 1d20198
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-ducks-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Remove animations on actionlist checkmark
44 changes: 11 additions & 33 deletions app/components/primer/alpha/action_list.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
list-style: none;
}

.ActionListWrap--inset, .ActionListWrap--inset[popover] {
.ActionListWrap--inset,
.ActionListWrap--inset[popover] {
padding: var(--base-size-8);
}

Expand Down Expand Up @@ -334,7 +335,9 @@
&[aria-expanded] {
& + .ActionList--subGroup {
@media screen and (prefers-reduced-motion: no-preference) {
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
transition:
opacity 160ms cubic-bezier(0.25, 1, 0.5, 1),
transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
}

& .ActionListContent {
Expand Down Expand Up @@ -429,26 +432,14 @@
& .ActionListItem-multiSelectCheckmark {
visibility: visible;
opacity: 1;
transition: visibility 0 linear 0, opacity 50ms;
transition:
visibility 0 linear 0,
opacity 50ms;
}

/* singleselect checkmark */
& .ActionListItem-singleSelectCheckmark {
visibility: visible;

@media screen and (prefers-reduced-motion: no-preference) {
animation: checkmarkIn 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;

@keyframes checkmarkIn {
from {
clip-path: inset(16px 0 0 0);
}

to {
clip-path: inset(0 0 0 0);
}
}
}
}

/* checkbox */
Expand All @@ -471,28 +462,15 @@
& .ActionListItem-multiSelectCheckmark {
visibility: hidden;
opacity: 0;
transition: visibility 0 linear 50ms, opacity 50ms;
transition:
visibility 0 linear 50ms,
opacity 50ms;
}

/* singleselect checkmark */
& .ActionListItem-singleSelectCheckmark {
visibility: hidden;
transition: visibility 0s linear 200ms;
clip-path: inset(16px 0 0 0);

@media screen and (prefers-reduced-motion: no-preference) {
animation: checkmarkOut 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;

@keyframes checkmarkOut {
from {
clip-path: inset(0 0 0 0);
}

to {
clip-path: inset(16px 0 0 0);
}
}
}
}

/* checkbox */
Expand Down

0 comments on commit 1d20198

Please sign in to comment.