Skip to content

Commit 0d26e4f

Browse files
committed
fix(UI): resolve rymnc comments
1 parent 2fb32ad commit 0d26e4f

6 files changed

Lines changed: 43 additions & 14 deletions

File tree

src/components/AnchorNav.astro

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ const { tabs, ariaLabel = 'Section navigation' } = Astro.props;
1515
---
1616

1717
<nav class="anchor-nav" aria-label={ariaLabel}>
18-
<div class="container anchor-nav-inner">
19-
{tabs.map((t) => (
20-
<a href={t.href}>
21-
{t.iconSvg && <span class="ic" set:html={t.iconSvg} />}
22-
<span class="lbl">
23-
{t.label}
24-
{typeof t.count === 'number' && <span class="count">({t.count})</span>}
25-
</span>
26-
</a>
27-
))}
18+
<div class="container">
19+
<div class="anchor-nav-inner">
20+
{tabs.map((t) => (
21+
<a href={t.href}>
22+
{t.iconSvg && <span class="ic" set:html={t.iconSvg} />}
23+
<span class="lbl">
24+
{t.label}
25+
{typeof t.count === 'number' && <span class="count">({t.count})</span>}
26+
</span>
27+
</a>
28+
))}
29+
</div>
2830
</div>
2931
</nav>
3032

@@ -41,9 +43,14 @@ const { tabs, ariaLabel = 'Section navigation' } = Astro.props;
4143
overflow-x: auto;
4244
flex-wrap: wrap;
4345
scrollbar-width: none;
46+
/* Bleed the row 0.9rem into the container padding on both sides so
47+
the link text — inset by its own 0.9rem padding — aligns to the
48+
container edge. Done on the row (not a:first-child) so EVERY
49+
wrapped row's leading item aligns, not just the first. */
50+
margin-left: -0.9rem;
51+
margin-right: -0.9rem;
4452
}
4553
.anchor-nav-inner::-webkit-scrollbar { display: none; }
46-
.anchor-nav-inner > a:first-child { margin-left: -0.9rem; }
4754

4855
.anchor-nav a {
4956
display: inline-flex;

src/components/PageHeader.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const { breadcrumbs = [], title, lede, ledeBullets, metaRow, pills = [], centere
5959

6060
<style>
6161
.page-header {
62-
padding: 4.5rem 0 3rem;
62+
padding: 4.5rem 0 2rem;
6363
background: radial-gradient(ellipse 60% 50% at 90% 10%, rgba(49, 130, 206, 0.05), transparent 60%);
6464
}
6565
/* Centered variant — used by blog post details (per 2026-05-22
@@ -113,6 +113,10 @@ const { breadcrumbs = [], title, lede, ledeBullets, metaRow, pills = [], centere
113113
text-wrap: balance;
114114
min-width: 0;
115115
}
116+
/* No lede/pills/metaRow after the title (e.g. the use-cases index) —
117+
drop the title's bottom margin so it doesn't stack with the header
118+
padding into a dead gap above the content. */
119+
.page-header h1:last-child { margin-bottom: 0; }
116120
.page-header .lede {
117121
font-size: 1.0625rem;
118122
line-height: 1.65;

src/layouts/DetailPageLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const { title, pageTitle, description, current, breadcrumbs, lede, ledeBullets,
4242

4343
<style>
4444
.detail {
45-
padding: 3rem 0 4rem;
45+
padding: 1.5rem 0 4rem;
4646
}
4747
.detail-grid {
4848
display: grid;

src/pages/approaches/[slug].astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,17 @@ function maturityTone(m?: string): 'strong' | 'mid' | 'plain' | 'muted' {
10561056
.block-bad h5 { color: var(--color-warning-strong); }
10571057

10581058
/* ─── Tables (scoped CSS can't pierce set:html, use :global) ─ */
1059+
/* The table-wrap is also `.prose`, which caps body text at 70ch for
1060+
readability. A data table is not running prose — let it fill the
1061+
full column so its right edge lines up with the section headings
1062+
and option cards instead of stopping ~100px short. Scoped class
1063+
(gets an astro-cid attr) outweighs the global .prose rule. */
10591064
.table-wrap {
10601065
overflow-x: auto;
10611066
margin: 1rem 0;
10621067
border: 1px solid var(--color-border);
10631068
border-radius: var(--radius-md);
1069+
max-width: none;
10641070
}
10651071
:global(.approach-main .prose table) {
10661072
width: 100%;

src/pages/blog/index.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ const today = new Date().toISOString().slice(0, 10);
7878
.post-list {
7979
list-style: none;
8080
padding: 0;
81-
margin: 2rem 0 4rem;
81+
/* No top margin — the shared .list-body already supplies the 2rem
82+
top padding. A margin here doubled it, leaving a ~96px gap under
83+
the header. */
84+
margin: 0 0 4rem;
8285
display: flex;
8386
flex-direction: column;
8487
gap: 1px;

src/styles/globals.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ section.block {
232232
max-width: 70ch;
233233
}
234234
.prose > * + * { margin-top: 1.1em; }
235+
/* The first element of a prose block never gets top spacing or a
236+
section-break divider — those belong *between* sections. Without this
237+
a leading <h2> (margin-top + padding-top + border-top) drops ~100px of
238+
dead space and a stray rule directly under the page lede. */
239+
.prose > :first-child {
240+
margin-top: 0;
241+
padding-top: 0;
242+
border-top: none;
243+
}
235244
.prose h1 {
236245
font-family: var(--font-sans);
237246
font-size: clamp(1.75rem, 3vw, 2.1rem);

0 commit comments

Comments
 (0)