Hide the section tabs scroll button when all tabs already fit (#4540)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Zeno Kapitein
2026-08-25 16:35:38 +02:00
committed by GitHub
parent 94a496c561
commit 0ff21b7ae2
2 changed files with 8 additions and 3 deletions
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Stop the section tabs in the header from showing a scroll button and faded edge when all tabs already fit.
@@ -79,9 +79,9 @@ export function SiteSectionTabs(props: {
>
<NavigationMenu.List
className={tcls(
'-mx-3 flex grow gap-2 bg-transparent',
'pl-4 sm:pl-6 md:pl-8',
!children ? 'pr-4 sm:pr-6 md:pr-8' : 'pr-4'
'flex grow gap-2 bg-transparent',
'pl-1 sm:pl-3 md:pl-5',
!children ? 'pr-1 sm:pr-3 md:pr-5' : 'pr-1'
)}
aria-label="Sections"
data-gb-sections