Hide the phantom empty top bar, keep only the Gin sidebar
Core Navigation's top bar only shows itself when its tools/context/ actions regions are non-empty (`:has(:not(:empty))`). With no blocks placed in those regions, they still contain whitespace text nodes from Twig's loop scaffolding, which defeats that check -- the bar rendered anyway, empty, and pushed page content down to make room for it. Attached globally via hook_page_attachments() rather than scoped to /lignes or /dashboard, since the Navigation chrome renders on every authenticated page, not just our custom routes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/* Core Navigation's top bar (`.top-bar`) only shows itself when its
|
||||
tools/context/actions regions are non-empty -- but with no blocks placed
|
||||
there, the regions still contain whitespace text nodes from the Twig
|
||||
loop scaffolding, which defeats the `:not(:empty)` check. Result: an
|
||||
empty top bar renders anyway, with the page content pushed down to make
|
||||
room for it. We only use the Gin sidebar (the left icon rail), so force
|
||||
the phantom bar off and collapse the space it would otherwise reserve. */
|
||||
.top-bar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.top-bar ~ .dialog-off-canvas-main-canvas {
|
||||
margin-block-start: 0 !important;
|
||||
}
|
||||
Reference in New Issue
Block a user