diff --git a/resources/css/app.css b/resources/css/app.css index 7ab8274949..8bfb74a3cb 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -6159,8 +6159,15 @@ html.dark .canvas-zoom-max { tab strip, and settings rail float as framed panels over a dotted backdrop, like the canvas islands. Set on by applyStoredTheme() from localStorage.navStyle; the default style keeps edge-to-edge bars. */ +/* Width of the collapsed desktop sidebar and the brand cell above it. */ +html { + --sidebar-collapsed-w: 4rem; +} + @media (min-width: 1024px) { html[data-nav-style="floating"] { + /* The framed rail needs no edge spacing: 1px border + 5px padding + 40px content. */ + --sidebar-collapsed-w: 3.25rem; --floating-gap: 0.5rem; --floating-radius: 8px; --floating-line: oklch(0% 0 0 / 0.09); @@ -6233,6 +6240,18 @@ html.dark .canvas-zoom-max { border-radius: 0 0 var(--floating-radius) var(--floating-radius); } + html[data-nav-style="floating"] .app-sidebar nav.sidebar-collapsed { + padding-left: 0.3125rem; + padding-right: 0.3125rem; + } + + html[data-nav-style="floating"] .app-sidebar nav.sidebar-collapsed > .sidebar-footer { + margin-left: -0.3125rem; + margin-right: -0.3125rem; + padding-left: 0.3125rem; + padding-right: 0.3125rem; + } + html[data-nav-style="floating"] .app-main { margin-left: calc(var(--sidebar-w, 14rem) + var(--floating-gap)); /* The content top lines up with the sidebar and settings rail panels. diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 355618d79f..bfc7574762 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -33,7 +33,7 @@ localStorage.setItem('sidebarCollapsed', this.collapsed); } }" @open-global-search.window="open = false" @page-width-changed.window="pageWidth = $event.detail" - :style="{ '--sidebar-w': collapsed ? '4rem' : '14rem' }" x-cloak + :style="{ '--sidebar-w': collapsed ? 'var(--sidebar-collapsed-w)' : '14rem' }" x-cloak @class(['app-shell dark:text-inherit text-black', 'app-shell-canvas flex h-dvh flex-col' => $fullBleed ?? false])> {{-- ============ DESKTOP TOP BAR ============ --}}