mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 07:35:16 +00:00
Hide scrollbar on sections (#3367)
This commit is contained in:
@@ -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'
|
||||
)}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user