Skip to content

Commit c8910b3

Browse files
authored
Merge pull request #50 from stackabletech/24-pin-top-level-menu
pin top level menu
2 parents 5d05a8e + c0a4691 commit c8910b3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/css/header.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,14 @@ body {
176176

177177
.navbar-sub {
178178
display: block;
179-
position: relative;
180179
background-color: var(--color-brand-primary);
181180
padding: 5px 15px 5px 0;
182181
transition: all 0.5s;
183-
height: 42px;
182+
height: var(--navbar-sub-height);
183+
position: fixed;
184+
top: var(--navbar-height);
185+
width: 100%;
186+
z-index: var(--z-index-navbar);
184187
/* overflow: hidden; */
185188
}
186189

src/css/vars.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@
121121
--footer-link-font-color: var(--color-smoke-70);
122122
/* dimensions and positioning */
123123
--navbar-height: calc(73 / var(--rem-base) * 1rem);
124+
--navbar-sub-height: calc(45 / var(--rem-base) * 1rem);
124125
--toolbar-height: calc(45 / var(--rem-base) * 1rem);
125126
--drawer-height: var(--toolbar-height);
126-
--body-top: var(--navbar-height);
127+
--body-top: calc(var(--navbar-height) + var(--navbar-sub-height));
127128
--body-min-height: calc(100vh - var(--body-top));
128129
--nav-height: calc(var(--body-min-height) - var(--toolbar-height));
129130
--nav-height--desktop: var(--body-min-height);

0 commit comments

Comments
 (0)