Skip to content

Commit 6dcedf5

Browse files
committed
Introduce fixed --site-control-* tokens; polish footer & mobile nav
1 parent af4d2e7 commit 6dcedf5

9 files changed

Lines changed: 30 additions & 20 deletions

File tree

‎app/(home)/page.module.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
.heroCtaRow {
147147
display: flex;
148148
flex-wrap: wrap;
149-
gap: var(--site-btn-gap);
149+
gap: var(--site-control-gap);
150150
}
151151

152152
/* Interaction-model row: between ~700 and 1075 the SVG does not fit;

‎components/controls/Button.module.css‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
.btn {
1414
display: inline-flex;
1515
align-items: center;
16-
gap: var(--site-btn-gap);
16+
gap: var(--site-control-gap);
1717
min-height: var(--site-control-h);
18-
padding: 0 var(--site-btn-pad-x);
18+
padding: 0 var(--site-control-px);
1919
border-radius: var(--site-r-md);
2020
border: 1px solid var(--site-border-strong);
2121
background: var(--site-wash);
@@ -98,7 +98,7 @@
9898
display: inline-flex;
9999
align-items: center;
100100
min-height: var(--site-control-h);
101-
padding: 0 var(--site-btn-pad-x);
101+
padding: 0 var(--site-control-px);
102102
border-radius: var(--site-r-md);
103103
border: 1px dashed var(--site-rule-2);
104104
background: transparent;
@@ -114,9 +114,9 @@
114114
.repo {
115115
display: inline-flex;
116116
align-items: center;
117-
gap: var(--site-btn-gap);
117+
gap: var(--site-control-gap);
118118
min-height: var(--site-control-h);
119-
padding: 0 var(--site-btn-pad-x);
119+
padding: 0 var(--site-control-px);
120120
border-radius: var(--site-r-md);
121121
border: 1px solid var(--site-accent-line);
122122
background: var(--site-accent-wash);

‎components/layout/CtaRow.module.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
.ctaRow {
55
display: flex;
66
flex-wrap: wrap;
7-
gap: var(--site-btn-gap);
7+
gap: var(--site-control-gap);
88
}

‎components/media/CommandLine.module.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
display: flex;
2929
align-items: center;
3030
min-height: var(--site-control-h);
31-
padding: 0 calc(var(--site-btn-pad-x) * 2.4) 0 var(--site-btn-pad-x);
31+
padding: 0 calc(var(--site-control-px) * 2.4) 0 var(--site-control-px);
3232
min-width: 0;
3333
}
3434

‎components/nav/FloatingNav.module.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,6 @@
302302

303303
.sheetIconRow {
304304
display: flex;
305-
gap: var(--site-btn-gap);
305+
gap: var(--site-control-gap);
306306
padding: var(--site-gap-normal) var(--site-gap-tight) 0;
307307
}

‎components/nav/FloatingNav.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export function FloatingNav() {
293293
<Search size={18} aria-hidden />
294294
</button>
295295

296-
<ThemeToggle className={s.navIcon} />
296+
<ThemeToggle className={`${s.navIcon} ${s.desktopOnly}`} />
297297

298298
<button
299299
type="button"

‎components/nav/Footer.module.css‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,18 @@
175175
min-width: 0;
176176
}
177177

178-
.itemLink {
178+
/* Rich items — original footer treatment. Hover halo pads outward via a
179+
matching negative margin so the tint doesn't shift layout; kept tight
180+
(6px) so it doesn't bleed into neighboring rows/columns.
181+
.itemStatic drops hover for rows without an href yet. */
182+
.itemLink,
183+
.itemStatic {
179184
display: flex;
180185
flex-direction: column;
181186
gap: 2px;
182187
min-width: 0;
183-
padding: var(--site-gap-tight);
184-
margin: calc(-1 * var(--site-gap-tight));
188+
padding: 5px 10px;
189+
margin: -5px -10px;
185190
border-radius: var(--site-r-md);
186191
text-decoration: none;
187192
color: inherit;

‎components/nav/Footer.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function Footer() {
8989
{group.items.map((item) => (
9090
<li key={item.href} className={s.item}>
9191
{group.header === 'Use cases' ? (
92-
<span className={s.itemLink}>
92+
<span className={s.itemStatic}>
9393
<span className={s.itemName}>{item.name}</span>
9494
<span className={s.itemDesc}>{item.desc}</span>
9595
</span>

‎design/tokens.css‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878
--site-pad-lg-y: calc(var(--site-u) * 2.75);
7979
--site-pad-lg-x: calc(var(--site-u) * 3.7);
8080

81-
--site-btn-pad-y: calc(var(--site-u) * 0.75);
82-
--site-btn-pad-x: calc(var(--site-u) * 1.2);
83-
--site-btn-gap: calc(var(--site-u) * 0.75);
84-
/* Shared control height — every inline control (Button, CommandLine, etc.)
85-
that sits in the same row should render at this height. */
86-
--site-control-h: calc(var(--site-u) * 2.925);
81+
/* Inline controls (button, input, cli, select, …) — viewport-independent
82+
so CTAs and inputs stay legible at every width. Any control that sits
83+
in the same row should read from this family. */
84+
--site-control-h: 40px;
85+
--site-control-px: 16px;
86+
--site-control-gap: 10px;
8787
--site-list-item-gap: calc(var(--site-u) * 0.75);
8888
--site-list-item-pad-y: calc(var(--site-u) * 0.35);
8989
--site-code-pad-y: calc(var(--site-u) * 1);
@@ -313,6 +313,11 @@
313313
}
314314
@media (max-width: 640px) {
315315
:root { --site-fs-heading-1: var(--site-fs-12); }
316+
:root {
317+
--site-control-h: 36px;
318+
--site-control-px: 14px;
319+
--site-control-gap: 8px;
320+
}
316321
}
317322
@media (max-width: 560px) {
318323
:root { --site-fs-display: var(--site-fs-13); }

0 commit comments

Comments
 (0)