use custom scrollbar on all pages - avoids layout shifting on blog pages

This commit is contained in:
Michael Freno
2026-01-04 15:12:22 -05:00
parent a620a9f4c5
commit 2093859654
3 changed files with 191 additions and 195 deletions

View File

@@ -209,7 +209,6 @@
transition-duration: 500ms; transition-duration: 500ms;
syntax: "*"; syntax: "*";
inherits: false; inherits: false;
scrollbar-color: var(--color-text) var(--color-base);
} }
::selection { ::selection {
@@ -224,14 +223,6 @@
background-color: var(--color-text); background-color: var(--color-text);
color: var(--color-crust); color: var(--color-crust);
} }
#center-body {
scrollbar-width: thin;
scrollbar-gutter: stable both-edges;
}
#center-body:has(.blog-overide) {
scrollbar-width: none !important;
scrollbar-gutter: unset !important;
}
#rightbar-content { #rightbar-content {
scrollbar-width: none; scrollbar-width: none;
} }

View File

@@ -16,6 +16,7 @@ import { BarsProvider, useBars } from "./context/bars";
import { DarkModeProvider } from "./context/darkMode"; import { DarkModeProvider } from "./context/darkMode";
import { createWindowWidth, isMobile } from "~/lib/resize-utils"; import { createWindowWidth, isMobile } from "~/lib/resize-utils";
import { MOBILE_CONFIG } from "./config"; import { MOBILE_CONFIG } from "./config";
import CustomScrollbar from "./components/CustomScrollbar";
function AppLayout(props: { children: any }) { function AppLayout(props: { children: any }) {
const { const {
@@ -167,7 +168,13 @@ function AppLayout(props: { children: any }) {
onTouchEnd={handleCenterTapRelease} onTouchEnd={handleCenterTapRelease}
> >
<Suspense fallback={<TerminalSplash />}> <Suspense fallback={<TerminalSplash />}>
<CustomScrollbar
autoHide={true}
autoHideDelay={1500}
rightOffset={250}
>
{props.children} {props.children}
</CustomScrollbar>
</Suspense> </Suspense>
</div> </div>
</ErrorBoundary> </ErrorBoundary>

View File

@@ -286,7 +286,6 @@ export default function PostPage() {
}; };
return ( return (
<CustomScrollbar autoHide={true} autoHideDelay={1500} rightOffset={250}>
<Show <Show
when={data()} when={data()}
fallback={ fallback={
@@ -479,6 +478,5 @@ export default function PostPage() {
); );
}} }}
</Show> </Show>
</CustomScrollbar>
); );
} }