+
+
-
- {siteSpaces.length > 1 && (
-
-
-
+ {siteSpaces.length > 1 && (
+
+
+
+ )}
+ {sections &&
+ (sections.list.some((s) => s.object === 'site-section-group') || // If there's even a single group, show the tabs
+ sections.list.length > 1) && ( // Otherwise, show the tabs if there's more than one section
+
)}
- {sections &&
- (sections.list.some((s) => s.object === 'site-section-group') || // If there's even a single group, show the tabs
- sections.list.length > 1) && ( // Otherwise, show the tabs if there's more than one section
-
- )}
-
diff --git a/packages/gitbook/src/components/RootLayout/globals.css b/packages/gitbook/src/components/RootLayout/globals.css
index 9bff7fc6c0..cb94319990 100644
--- a/packages/gitbook/src/components/RootLayout/globals.css
+++ b/packages/gitbook/src/components/RootLayout/globals.css
@@ -4,9 +4,12 @@
@layer base {
:root {
- --scrollbar-width: calc(100vw - 100%);
@apply leading-relaxed;
}
+ * {
+ scrollbar-color: theme("colors.tint.7") theme("colors.tint.2");
+ scrollbar-width: thin;
+ }
body {
@apply text-tint-strong antialiased;
}
@@ -37,22 +40,6 @@
@apply subpixel-antialiased;
}
- /* Light mode */
- ::-webkit-scrollbar {
- @apply bg-tint-subtle;
- width: 8px;
- height: 8px;
- }
-
- ::-webkit-scrollbar-thumb {
- @apply bg-tint-7;
- border-radius: 8px;
- }
-
- ::-webkit-scrollbar-thumb:hover {
- @apply bg-tint-8;
- }
-
.flip-heading-hash {
@apply [&:is(h1,h2,h3,h4)]:flex-row-reverse;
@apply [&:is(h1,h2,h3,h4)]:[justify-content:start];
@@ -118,23 +105,6 @@
@apply bg-gradient-to-bl from-tint-4 to-tint-base to-60% bg-fixed;
}
- /**
- * Utility to prevent horizontal jumps when the vertical scrollbar appears
- * It should be used on main containers of the layout, while preserving horizontal delimiters.
- * It basically adds a margin-left with the width of the scrollbar, and a width that compensates for it; when a scrollbar is displayed.
- * Inspired by https://aykevl.nl/2014/09/fix-jumping-scrollbar, but adapted to work on child elements of "html"
- */
- .scroll-nojump {
- width: 100%;
- }
- @media screen and (min-width: 1536px) {
- .scroll-nojump {
- margin-left: var(--scrollbar-width);
- margin-right: 0;
- width: calc(100% - var(--scrollbar-width));
- }
- }
-
.elevate-link {
& a[href]:not(.link-overlay) {
position: relative;
diff --git a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
index f57aec64cd..095a5febad 100644
--- a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
+++ b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
@@ -89,70 +89,69 @@ export function SpaceLayout(props: {
{aiMode === CustomizationAIMode.Assistant ? (
) : null}
-
-
-
-
+
+ )
+ }
+ innerHeader={
+ // displays the search button and/or the space dropdown in the ToC according to the header/variant settings. E.g if there is no header, the search button will be displayed in the ToC.
+ <>
+ {!withTopHeader && searchAndAI}
+ {!withTopHeader && withSections && sections && (
+
+ )}
+ {isMultiVariants && !sections && (
+
-
-
- )
- }
- innerHeader={
- // displays the search button and/or the space dropdown in the ToC according to the header/variant settings. E.g if there is no header, the search button will be displayed in the ToC.
- <>
- {!withTopHeader && searchAndAI}
- {!withTopHeader && withSections && sections && (
-
- )}
- {isMultiVariants && !sections && (
-
- )}
- >
- }
- />
-
{children}
-
+ />
+ )}
+ >
+ }
+ />
+
{children}