fix: sidebar hauteur — chaîne de dépendance au lieu de 100vh redondant
Root cause (expert analysis): h-screen sur aside ET parent = 2 calculs 100vh indépendants → 1px de différence en prod (subpixel, scrollbar). Fix: - aside: h-screen → h-full (dépend du parent, 1 seule source 100vh) - body: h-screen overflow-hidden (verrouille le viewport, empêche scroll parasite) - Suspense fallback: h-screen → h-full (cohérent)
This commit is contained in:
@@ -37,7 +37,7 @@ export default async function MainLayout({
|
|||||||
>
|
>
|
||||||
{/* No top-bar header — sidebar-only navigation (architectural-grid design) */}
|
{/* No top-bar header — sidebar-only navigation (architectural-grid design) */}
|
||||||
<div className="flex h-screen overflow-hidden bg-memento-desk dark:bg-background">
|
<div className="flex h-screen overflow-hidden bg-memento-desk dark:bg-background">
|
||||||
<Suspense fallback={<div className="hidden w-80 xl:w-[22rem] 2xl:w-[26rem] shrink-0 md:block h-screen self-stretch" />}>
|
<Suspense fallback={<div className="hidden w-80 xl:w-[22rem] 2xl:w-[26rem] shrink-0 md:block h-full self-stretch" />}>
|
||||||
<Sidebar user={session?.user} />
|
<Sidebar user={session?.user} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default async function RootLayout({
|
|||||||
data-server-accent={serverAccent}
|
data-server-accent={serverAccent}
|
||||||
style={htmlStyle}
|
style={htmlStyle}
|
||||||
>
|
>
|
||||||
<body className={`${inter.className} ${inter.variable} ${manrope.variable} ${playfair.variable} ${jetbrainsMono.variable}`}>
|
<body className={`${inter.className} ${inter.variable} ${manrope.variable} ${playfair.variable} ${jetbrainsMono.variable} h-screen overflow-hidden`}>
|
||||||
<Script id="theme-init" src="/scripts/theme-init.js" strategy="beforeInteractive" />
|
<Script id="theme-init" src="/scripts/theme-init.js" strategy="beforeInteractive" />
|
||||||
<Script id="direction-init" src="/scripts/direction-init.js" strategy="beforeInteractive" />
|
<Script id="direction-init" src="/scripts/direction-init.js" strategy="beforeInteractive" />
|
||||||
<Script id="sw-cleanup" src="/scripts/sw-cleanup.js" strategy="afterInteractive" />
|
<Script id="sw-cleanup" src="/scripts/sw-cleanup.js" strategy="afterInteractive" />
|
||||||
|
|||||||
@@ -1182,7 +1182,7 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
|
|||||||
isImmersiveRoute && userCollapsed
|
isImmersiveRoute && userCollapsed
|
||||||
? 'fixed inset-y-0 start-0 z-[70]'
|
? 'fixed inset-y-0 start-0 z-[70]'
|
||||||
: 'fixed inset-y-0 start-0 z-[70] md:relative md:z-auto',
|
: 'fixed inset-y-0 start-0 z-[70] md:relative md:z-auto',
|
||||||
'h-screen min-h-0 w-80 xl:w-[22rem] 2xl:w-[26rem] shrink-0 flex flex-row overflow-hidden self-stretch',
|
'h-full min-h-0 w-80 xl:w-[22rem] 2xl:w-[26rem] shrink-0 flex flex-row overflow-hidden self-stretch',
|
||||||
'transition-transform duration-300 ease-in-out',
|
'transition-transform duration-300 ease-in-out',
|
||||||
isImmersiveRoute && userCollapsed
|
isImmersiveRoute && userCollapsed
|
||||||
? '-translate-x-full'
|
? '-translate-x-full'
|
||||||
|
|||||||
Reference in New Issue
Block a user