Skip to content

Commit

Permalink
enhancement/Issue-99: Refactor keyframes to be a transition (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevLab2425 authored Oct 17, 2024
1 parent 2f38f36 commit 8f68459
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
19 changes: 5 additions & 14 deletions src/components/side-nav/side-nav.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,15 @@

& #indicator {
display: inline-block;
transition: transform 1s ease;
}
}

.compactMenu:has(#compact-menu:popover-open) {
& #indicator {
animation: rotateindicatoropen 1s ease;
animation-fill-mode: forwards;
}
.compactMenu:not(:has(#compact-menu:popover-open)) #indicator {
transform: rotate(0deg);
}

@keyframes rotateindicatoropen {
from {
transform: rotate(0deg);
}

to {
transform: rotate(180deg);
}
.compactMenu:has(#compact-menu:popover-open) #indicator {
transform: rotate(180deg);
}

.compactMenuPopover {
Expand Down
19 changes: 5 additions & 14 deletions src/components/table-of-contents/table-of-contents.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,15 @@

& #indicator {
display: inline-block;
transition: transform 1s ease;
}
}

.compactMenu:has(#onthispage:popover-open) {
& #indicator {
animation: rotateindicatoropen 1s ease;
animation-fill-mode: forwards;
}
.compactMenu:not(:has(#onthispage:popover-open)) #indicator {
transform: rotate(0deg);
}

@keyframes rotateindicatoropen {
from {
transform: rotate(0deg);
}

to {
transform: rotate(180deg);
}
.compactMenu:has(#onthispage:popover-open) #indicator {
transform: rotate(180deg);
}

.compactMenuItem {
Expand Down

0 comments on commit 8f68459

Please sign in to comment.