Skip to content

Commit

Permalink
refactor(components): update menu hover state animation curve and tra…
Browse files Browse the repository at this point in the history
…nsition state guidance (#2353)

update menu and transition state guidance
  • Loading branch information
chris-at-jobber authored Feb 3, 2025
1 parent 2e11e22 commit a355b84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/patterns/interaction.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ An interactive element is... being interacted with.
- a custom focus ring is applied

#### Timing
Most state transitions use `var(--timing-base) ease-in` for a pleasant
Most state transitions use `var(--timing-base) ease-out` for a pleasant
transition.

#### CSS implementation
Expand All @@ -62,7 +62,7 @@ An interactive element is... being interacted with.
.myElement {
background-color: var(--color-surface);
/* apply consistent transitions to background and box-shadow */
transition: all var(--timing-base) ease-in;
transition: all var(--timing-base) ease-out;
cursor: pointer;
/* hide the default focus ring, but still support "high contrast" modes */
outline: transparent;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/Menu/Menu.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
gap: var(--menu-space);
align-items: center;
transition:
background-color var(--timing-base) ease-in,
box-shadow var(--timing-base) ease-in;
background-color var(--timing-base) ease-out,
box-shadow var(--timing-base) ease-out;
}

.action:hover,
Expand Down

0 comments on commit a355b84

Please sign in to comment.