Skip to content

Commit

Permalink
⏪ [Navigation] Fix exit animation
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 30, 2024
1 parent 8efb850 commit fcf78d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ const {id, items = []} = Astro.props;
z-index: calc(var(--index-thermosphere) + 1);
bottom: var(--nav-list-bottom);
right: 0;

/*
Using this layout breaks the close animation:
display: grid;
justify-items: end;
*/

&[aria-hidden='false'] {
width: auto;
Expand All @@ -103,6 +107,10 @@ const {id, items = []} = Astro.props;
}

.Item {
/* Required for the close animation to work */
float: right;
clear: both;

transition: translate var(--speed) var(--ease);
/* Stagger animation offset */
transition-delay: calc(var(--speed-fastest) * var(--nav-item-index));
Expand Down

0 comments on commit fcf78d3

Please sign in to comment.