Skip to content

Commit

Permalink
Add scroll-margin to make sure that menu items are fully visible when…
Browse files Browse the repository at this point in the history
… scrolled into view
  • Loading branch information
ciampo committed Nov 22, 2023
1 parent da57e59 commit 264b4fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/components/src/dropdown-menu-v2-ariakit/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ const baseItem = css`
padding-block: ${ ITEM_PADDING_BLOCK };
padding-inline: ${ ITEM_PADDING_INLINE };
/*
* Make sure that, when an item is scrolled into view (eg. while using the
* keyboard to move focus), the whole item comes into view
*/
scroll-margin: ${ CONTENT_WRAPPER_PADDING };
user-select: none;
outline: none;
Expand Down

0 comments on commit 264b4fc

Please sign in to comment.