Skip to content

Commit 867f175

Browse files
fix: keep burger visible when drawer has content, hide if nav+meta+secondary are empty (#4792)
Co-authored-by: Maximilian Franzke <[email protected]>
1 parent cfce428 commit 867f175

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

packages/components/src/components/header/header.scss

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,21 @@
5353
}
5454
}
5555

56-
// Hide the burger menu if there is no navigation
57-
&:has(.db-header-navigation:empty) {
56+
// Hide the burger ONLY when the drawer would be empty.
57+
// This requires: no main navigation AND no meta navigation AND no secondary action.
58+
&:has(.db-header-navigation:empty):has(
59+
.db-header-meta-navigation:empty
60+
):has(.db-header-secondary-action:empty) {
5861
.db-header-burger-menu-container {
5962
display: none;
6063
}
64+
}
6165

62-
&:has(.db-header-secondary-action:empty) {
63-
.db-header-action-container::before {
64-
display: none;
65-
}
66+
// Hide the action-area divider only when both navigation and secondary action are missing.
67+
// With no navigation but a secondary action, we keep the divider.
68+
&:has(.db-header-navigation:empty):has(.db-header-secondary-action:empty) {
69+
.db-header-action-container::before {
70+
display: none;
6671
}
6772
}
6873
}

0 commit comments

Comments
 (0)