Skip to content

Commit

Permalink
Fix overflowing inserter panel header causing extra scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Oct 18, 2024
1 parent d330f30 commit 0da3e74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ $block-inserter-tabs-height: 44px;
}

.block-editor-inserter__panel-header {
// Use `position: relative` to ensure any absolute positioned child elements are
// positioned relative to the panel header.
// This makes the overflow rule of the panel work correctly, particularly when the
// `VisuallyHidden` component is used within the inserter UI.
position: relative;

display: inline-flex;
align-items: center;
padding: $grid-unit-20 $grid-unit-20 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@
flex-direction: column;
overflow-y: auto;
scrollbar-gutter: auto;

// Use `position: relative` to ensure any absolute positioned child elements are
// positioned relative to the tab panel.
// This makes the overflow rule of the panel work correctly, particularly when the
// `VisuallyHidden` component is used within the inserter UI.
position: relative;
}

0 comments on commit 0da3e74

Please sign in to comment.