Skip to content

Commit

Permalink
fix(desktop-menu): use transition instead of animated keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
GregOnNet committed Mar 4, 2024
1 parent 080e8ad commit e5309cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
27 changes: 10 additions & 17 deletions src/_shell/menu/desktop/desktop-menu.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.desktop-menu-opacity-transition {
transition:
opacity 0.5s,
display 0.5s,
overlay 0.5s;

transition-behavior: allow-discrete;

@keyframes fadeOut {
from {
opacity: 0;
}
to {
opacity: 1;
}
opacity: 0;
}

.popover-showing {
animation: fadeIn both 500ms ease;
opacity: 1;
}

.popover-closing {
animation: fadeOut both 500ms ease;
opacity: 0;
}
2 changes: 1 addition & 1 deletion src/_shell/menu/desktop/desktop-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const MenuPopoverLink = component$<MenuPopoverLinkProps>(
onToggle$={event => {
isOpenedSig.value = event.newState === 'open';
}}
class='listbox container w-full'
class='listbox desktop-menu-opacity-transition container w-full'
>
<div class='flex justify-between'>
<ul class='flex basis-10/12 gap-10 p-10'>
Expand Down

0 comments on commit e5309cb

Please sign in to comment.