Skip to content

Commit 303ddf8

Browse files
committed
fix(web/styles): paper-mono focus halo + unified button radius
Two complaints from screenshot review: 1. The CommentForm textarea showed a heavy 2-3px solid orange border on focus — visually a "filled border" pattern, not the soft halo paper-mono is designed around. .proto-md-textarea now uses a 1px hairline idle border that darkens to --accent on focus, plus the --shadow-focus-ring token (which existed unused) for the 3px translucent halo. No layout shift on focus. 2. Buttons rendered different shapes across the site: pills (radius- full = 9999px) for .proto-btn-primary / .proto-btn-secondary / .proto-mod-btn; rectangles (radius-sm) for .proto-confirm-btn in modals. design.md mandates "small radii (≤10px)" so the modal button is the design-correct one. Aligned all four button families to radius-sm so a Post button and a Revoke-token button feel like the same control. Affected surfaces (visual change only, no behavioral change): - /p/[id] comment form Post button - /settings/tokens reveal page Copy/Done - /settings/bots create + mint forms - /admin/* moderation buttons - All other primary/secondary buttons site-wide
1 parent b56162c commit 303ddf8

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

web/src/styles/prototype.css

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,8 @@ summary.proto-nav-avatar::-webkit-details-marker { display: none; }
20222022
padding: var(--sp-2) var(--sp-8);
20232023
margin-right: var(--sp-4);
20242024
border: var(--bw-hair) solid var(--border);
2025-
border-radius: var(--radius-full);
2025+
/* Unified button radius — see .proto-btn-primary header note. */
2026+
border-radius: var(--radius-sm);
20262027
background: var(--surface);
20272028
cursor: pointer;
20282029
}
@@ -3457,14 +3458,20 @@ a.proto-inbox-chip:hover {
34573458
Switched from :focus to :focus-visible so the indicator only
34583459
appears on keyboard focus, not on click. */
34593460

3461+
/* Button radii: design.md mandates "small radii (≤10px)". The
3462+
* primary/secondary/mod-btn families historically used radius-full
3463+
* (a 9999px pill) which read as a different button system from the
3464+
* modal's .proto-confirm-btn (radius-sm). All button families now
3465+
* share radius-sm so a Post button and a Revoke-token button feel
3466+
* like the same control across the site. */
34603467
.proto-btn-primary {
34613468
padding: var(--sp-6) var(--sp-16);
34623469
font-family: var(--font-body);
34633470
font-size: var(--fs-body);
34643471
color: var(--white);
34653472
background: var(--accent);
34663473
border: var(--bw-hair) solid var(--accent);
3467-
border-radius: var(--radius-full);
3474+
border-radius: var(--radius-sm);
34683475
cursor: pointer;
34693476
transition: background var(--transition-short);
34703477
}
@@ -3481,7 +3488,7 @@ a.proto-inbox-chip:hover {
34813488
color: var(--accent-ink);
34823489
background: var(--surface);
34833490
border: var(--bw-hair) solid var(--accent);
3484-
border-radius: var(--radius-full);
3491+
border-radius: var(--radius-sm);
34853492
cursor: pointer;
34863493
text-decoration: none;
34873494
display: inline-flex;
@@ -3761,19 +3768,30 @@ a.proto-inbox-chip:hover {
37613768
.proto-md-textarea {
37623769
display: block;
37633770
width: 100%;
3764-
border: 0;
3771+
border: var(--bw-hair) solid var(--rule-hair);
3772+
border-radius: var(--radius-sm);
37653773
padding: var(--sp-12);
37663774
font-family: var(--font-mono);
37673775
font-size: var(--fs-body);
37683776
line-height: var(--lh-body);
37693777
background: var(--bg);
37703778
color: var(--text);
37713779
resize: vertical;
3780+
transition: border-color var(--transition-short),
3781+
box-shadow var(--transition-short);
37723782
}
37733783

3784+
/* Paper-mono focus pattern: hairline border darkens to accent + soft
3785+
* 3px halo via box-shadow (translucent --accent-border). Replaces
3786+
* the previous 2px solid inset outline that read as a heavy filled
3787+
* border in the screenshot — the new shape uses the
3788+
* `--shadow-focus-ring` token (which existed unused) so the focus
3789+
* affordance harmonizes with the rest of the surface instead of
3790+
* dominating it. */
37743791
.proto-md-textarea:focus-visible {
3775-
outline: var(--outline-width) solid var(--accent);
3776-
outline-offset: var(--outline-offset-inset);
3792+
outline: none;
3793+
border-color: var(--accent);
3794+
box-shadow: var(--shadow-focus-ring);
37773795
}
37783796

37793797
/* Visually hidden but still focusable so HTML5 `required` validation

0 commit comments

Comments
 (0)