Always show scrollbars (#3363)

This commit is contained in:
Greg Bergé
2025-06-20 08:41:21 +02:00
committed by GitHub
parent 7ccbf55ba7
commit 42d43e09c4
4 changed files with 6 additions and 11 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Show scrollbars
@@ -47,7 +47,7 @@ export const CodeBlockRenderer = forwardRef(function CodeBlockRenderer(
/>
<pre
className={tcls(
'hide-scroll relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&]:bg-tint-base',
'relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&]:bg-tint-base',
'rounded-md straight-corners:rounded-sm shadow-sm',
title && 'rounded-ss-none'
)}
@@ -185,7 +185,6 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
'w-full',
'overflow-x-scroll',
'overflow-y-hidden',
'hide-scroll',
'-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'
)}
@@ -62,15 +62,6 @@
}
@layer utilities {
/* hide scroll bar but still scroll */
.hide-scroll::-webkit-scrollbar {
display: none;
}
.hide-scroll {
scrollbar-width: none;
-ms-overflow-style: none;
}
.linear-mask-gradient {
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 96px, rgba(0, 0, 0, 0));
}