Hide scrollbar on sections (#3367)

This commit is contained in:
Greg Bergé
2025-06-20 14:31:18 +02:00
committed by GitHub
parent df848ef64e
commit 4721403986
4 changed files with 19 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Hide scrollbar on sections
@@ -680,9 +680,7 @@ body:has(.openapi-select-popover) {
/* Tabs */
.openapi-panel-header,
.openapi-tabs-list {
@apply flex flex-row gap-1.5 py-1.5 px-2.5 w-full overflow-x-scroll;
scrollbar-width: none;
-ms-overflow-style: none;
@apply flex flex-row gap-1.5 py-1.5 px-2.5 w-full overflow-x-auto no-scrollbar;
}
.openapi-tabs-tab {
@@ -183,8 +183,8 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
<div
className={tcls(
'w-full',
'overflow-x-scroll',
'overflow-y-hidden',
'overflow-x-auto',
'no-scrollbar',
'-mb-4 pb-4', // Positive padding / negative margin allows the navigation menu indicator to show in a scroll viewƒ
!sections ? ['hidden', 'page-no-toc:flex'] : 'flex'
)}
+11
View File
@@ -456,6 +456,17 @@ const config: Config = {
},
},
plugins: [
plugin(({ addUtilities }) => {
addUtilities({
'.no-scrollbar': {
'scrollbar-width': 'none',
'-ms-overflow-style': 'none',
'&::-webkit-scrollbar': {
display: 'none',
},
},
});
}),
plugin(({ addVariant }) => {
/**
* Variant when the Table of Content navigation is open.