Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove animations on actionlist checkmark #2527

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading