diff --git a/web/panda.config.ts b/web/panda.config.ts index f288d81a1..6dbb15758 100644 --- a/web/panda.config.ts +++ b/web/panda.config.ts @@ -136,6 +136,14 @@ export default defineConfig({ accent: { value: "{colors.accent.default}" }, }, }, + sizes: { + sidebarWidth: { + value: { + md: "33%", + lg: "25%", + }, + }, + }, spacing: { safeBottom: { value: "env(safe-area-inset-bottom)" }, }, diff --git a/web/src/components/site/Navigation/Navigation.tsx b/web/src/components/site/Navigation/Navigation.tsx index b4078fc18..91d1ff1d8 100644 --- a/web/src/components/site/Navigation/Navigation.tsx +++ b/web/src/components/site/Navigation/Navigation.tsx @@ -36,17 +36,7 @@ export function Navigation() { md: "flex", }} height="dvh" - // The sidebar width is identical in both this container and the sidebar - // itself. The reason for this is the sidebar is "position: fixed" which - // means it cannot inherit the width from a parent since its true parent - // is the viewport, and to get around this, the default layout positions - // an empty box to the left of the viewport in order to push the content - // right and then the actual sidebar is rendered on top of this with the - // same width sizing configuration. - minWidth={{ - md: "1/4", - lg: "1/3", - }} + minWidth="sidebarWidth" boxShadow="md" > diff --git a/web/src/components/site/Navigation/Sidebar/Sidebar.tsx b/web/src/components/site/Navigation/Sidebar/Sidebar.tsx index ea56f44ff..0f679d299 100644 --- a/web/src/components/site/Navigation/Sidebar/Sidebar.tsx +++ b/web/src/components/site/Navigation/Sidebar/Sidebar.tsx @@ -22,10 +22,7 @@ export function Sidebar() {