mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-08-19 04:16:26 +00:00
fix(v2/nav): make tall Kubernetes menu reliable (2 columns, no scroll, no flip-block)
The Kubernetes dropdown was the only menu tall enough (22 items) to need a scrollbar (overflow-y on an anchor-positioned popover), which made it open/behave unreliably compared to the others. Two fixes: - The Kubernetes menu now uses a 2-column layout (column-count:2), halving its height (~731px → ~353px) so it shows in full WITHOUT a scrollbar at any realistic viewport. Multicol is column-major, so reading order is preserved. - Removed flip-block from the menu position-try fallbacks (kept flip-inline): the quick-nav is a sticky top bar, so a tall menu flipped above would shoot off the top of the screen. Menus now always open downward. Verified in Chrome 148 (Playwright): Kubernetes menu opens with no scrollbar and stays fully on-screen at viewport heights 700–1080; all 11 menus + the nested AWS submenu still open correctly; bar stays one row to 1280px. Cache-bust ?v=2.9.37. V2-only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e22dda5452
commit
d9860a77de
@@ -36,7 +36,7 @@
|
||||
|
||||
<span class="nb-quicknav__group">
|
||||
<button class="nb-quicknav__link nb-quicknav__btn" popovertarget="nb-pop-k8s" type="button">☸️ Kubernetes <span class="nb-quicknav__caret" aria-hidden="true">▾</span></button>
|
||||
<div class="nb-quicknav__menu" id="nb-pop-k8s" popover>
|
||||
<div class="nb-quicknav__menu nb-quicknav__menu--cols" id="nb-pop-k8s" popover>
|
||||
<a href="/kubernetes/">☸️ Overview</a>
|
||||
<a href="/docker/">🐳 Docker</a>
|
||||
<a href="/kubernetes-tools/">🧰 Tools</a>
|
||||
|
||||
Vendored
+16
-1
@@ -1351,7 +1351,9 @@ input[type="text"] {
|
||||
be all-physical or all-logical — mixing (e.g. `bottom span-inline-end`) is
|
||||
invalid and silently computes to `none`, leaving the menu over the button. */
|
||||
position-area: bottom span-right;
|
||||
position-try-fallbacks: flip-block, flip-inline; /* auto-flip near edges */
|
||||
/* Only flip horizontally near the right edge. NEVER flip-block: the quick-nav
|
||||
is a sticky top bar, so a tall menu flipped above would shoot off-screen. */
|
||||
position-try-fallbacks: flip-inline;
|
||||
margin-block-start: 0.45rem;
|
||||
min-width: 9.5rem;
|
||||
padding: 0.35rem;
|
||||
@@ -1402,6 +1404,19 @@ input[type="text"] {
|
||||
border-block-start: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Two-column layout for long menus (e.g. Kubernetes, 22 items) so they stay
|
||||
short enough to show in full WITHOUT a scrollbar — the scrollable tall popover
|
||||
was unreliable. Multicol is column-major, so reading order is preserved. */
|
||||
.nb-quicknav__menu--cols {
|
||||
display: block;
|
||||
column-count: 2;
|
||||
column-gap: 0.4rem;
|
||||
min-width: 22rem;
|
||||
}
|
||||
.nb-quicknav__menu--cols a {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
/* ── Nested submenu (e.g. Cloud → AWS ▸ → AWS pages) ──
|
||||
A second-level popover invoked from inside a menu. The trigger looks like a
|
||||
menu item; the submenu opens to the side (inline-end) of the trigger, with a
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ extra:
|
||||
extra_css:
|
||||
- https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap
|
||||
- static/extra.css
|
||||
- static/v2_elite.css?v=2.9.36
|
||||
- static/v2_elite.css?v=2.9.37
|
||||
|
||||
extra_javascript:
|
||||
- static/v2_filter.js?v=2.9.19
|
||||
|
||||
Reference in New Issue
Block a user