|
120 | 120 | .gen-sidebar-search { |
121 | 121 | margin: 0 0 1rem; |
122 | 122 | padding-block-start: 0.5rem; |
123 | | - padding-inline: 1.25rem 0.5rem; /* = pill left padding, aligns search with logo */ |
| 123 | + /* Search box left edge already lands on the nav-item edge at zero inset |
| 124 | + (the button's own padding ≈ --gen-nav-inset). Measured: search 69px, |
| 125 | + nav items 70px — aligned. Do NOT add --gen-nav-inset here or it double-insets. */ |
| 126 | + padding-inline: 0 0.4rem; |
| 127 | + margin-inline: 0; |
124 | 128 | } |
125 | 129 | .gen-sidebar-search :global(button[data-open-modal]), |
126 | 130 | .gen-sidebar-search button { |
127 | | - width: 100%; |
| 131 | + width: 100% !important; |
| 132 | + max-width: none !important; /* drop Starlight's 22rem cap so it fills the nav width */ |
| 133 | + margin-inline: 0 !important; /* no extra inset — wrapper sets the edge */ |
128 | 134 | background: rgba(255, 255, 255, 0.04) !important; |
129 | 135 | border: 1px solid var(--gen-hairline) !important; |
130 | 136 | border-radius: 10px !important; |
@@ -505,11 +511,24 @@ nav.sidebar ul ul li, |
505 | 511 | margin-inline-start: 0 !important; |
506 | 512 | padding-inline-start: 0 !important; |
507 | 513 | } |
508 | | -/* Sub-item links: align with the group label via MARGIN (not padding) so the |
509 | | - active pill wraps its text with EVEN padding on both sides — not a full-width |
510 | | - box with a big empty left gutter. Pill indent = group-label indent (1.25rem) |
511 | | - minus the link's own 0.6rem padding, so text still lines up under the logo. */ |
512 | | -.sidebar-content a { padding-inline: 0.6rem !important; margin-inline: 0.65rem 0.4rem !important; } |
| 514 | +/* ───────────────────────────────────────────────────────────────────── |
| 515 | + SINGLE SOURCE OF TRUTH for the left-nav column edge. |
| 516 | + --gen-nav-inset = the gap from the sidebar pane's left edge to where ALL |
| 517 | + nav text (group labels, items, active-pill text, search) must start so it |
| 518 | + lines up under the GEN logo. Tune ONLY this one value. |
| 519 | + The active pill / item background uses a small symmetric pad (--gen-pill-pad) |
| 520 | + and is pulled left by that same pad via negative margin, so the pill wraps |
| 521 | + its text evenly AND the text still sits at --gen-nav-inset. ───────────── */ |
| 522 | +:root { --gen-nav-inset: 1.25rem; --gen-pill-pad: 0.6rem; } |
| 523 | +/* Kill Starlight's own sidebar container padding so --gen-nav-inset is the |
| 524 | + ONLY horizontal inset (otherwise it stacks and pushes everything right). */ |
| 525 | +.sidebar-content:where([class*="astro-"]), |
| 526 | +nav.sidebar-pane:where([class*="astro-"]) { --sl-sidebar-pad-x: 0px !important; padding-inline: 0 !important; } |
| 527 | + |
| 528 | +.sidebar-content a { |
| 529 | + padding-inline: var(--gen-pill-pad) !important; |
| 530 | + margin-inline: calc(var(--gen-nav-inset) - var(--gen-pill-pad)) 0.4rem !important; |
| 531 | +} |
513 | 532 | /* narrower sidebar + tight content gap (z.ai ≈ 240px nav, snug column) */ |
514 | 533 | :root { |
515 | 534 | --sl-sidebar-width: 15rem; /* was 18.75rem */ |
@@ -543,7 +562,7 @@ nav.sidebar ul ul li, |
543 | 562 | color: #c5cad3; |
544 | 563 | opacity: 1; |
545 | 564 | margin-bottom: 0.45rem; |
546 | | - padding-inline: 1.25rem 0.7rem; |
| 565 | + padding-inline: var(--gen-nav-inset) 0.7rem; |
547 | 566 | } |
548 | 567 |
|
549 | 568 | /* active item (z.ai): white text on a neutral full-width light pill, no accent bar. */ |
|
0 commit comments