Skip to content

Commit a610752

Browse files
committed
fix(navbar): center logo (fix hamburger offset)
Use absolute positioning to horizontally center the navbar logo on md and smaller viewports. Prevents the hamburger menu from causing a visual offset.
1 parent 84637c4 commit a610752

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

assets/scss/_k8s_nav.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@
4646
box-shadow: none !important;
4747
}
4848
}
49+
50+
/* Centers logo without offset horizontally and vertically in the navbar on medium / mobile viewports */
51+
@include media-breakpoint-down(sm) {
52+
.navbar-brand__logo {
53+
position: absolute;
54+
left: 50%;
55+
transform: translateX(-50%);
56+
top: 20%;
57+
z-index: 5;
58+
}
59+
}
4960
}
5061

5162
.navbar-bg-onscroll {

0 commit comments

Comments
 (0)