File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " gitbook " : patch
3+ ---
4+
5+ Hide scrollbar on sections
Original file line number Diff line number Diff line change @@ -680,9 +680,7 @@ body:has(.openapi-select-popover) {
680680/* Tabs */
681681.openapi-panel-header ,
682682.openapi-tabs-list {
683- @apply flex flex-row gap-1.5 py-1.5 px-2.5 w-full overflow-x-scroll;
684- scrollbar-width : none;
685- -ms-overflow-style : none;
683+ @apply flex flex-row gap-1.5 py-1.5 px-2.5 w-full overflow-x-auto no-scrollbar;
686684}
687685
688686.openapi-tabs-tab {
Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
183183 < div
184184 className = { tcls (
185185 'w-full' ,
186- 'overflow-x-scroll ' ,
187- 'overflow-y-hidden ' ,
186+ 'overflow-x-auto ' ,
187+ 'no-scrollbar ' ,
188188 '-mb-4 pb-4' , // Positive padding / negative margin allows the navigation menu indicator to show in a scroll viewƒ
189189 ! sections ? [ 'hidden' , 'page-no-toc:flex' ] : 'flex'
190190 ) }
Original file line number Diff line number Diff line change @@ -456,6 +456,17 @@ const config: Config = {
456456 } ,
457457 } ,
458458 plugins : [
459+ plugin ( ( { addUtilities } ) => {
460+ addUtilities ( {
461+ '.no-scrollbar' : {
462+ 'scrollbar-width' : 'none' ,
463+ '-ms-overflow-style' : 'none' ,
464+ '&::-webkit-scrollbar' : {
465+ display : 'none' ,
466+ } ,
467+ } ,
468+ } ) ;
469+ } ) ,
459470 plugin ( ( { addVariant } ) => {
460471 /**
461472 * Variant when the Table of Content navigation is open.
You can’t perform that action at this time.
0 commit comments