fix(mobile): ui-btn-primary/secondary/ghost — 36px → 44px tap target on touch

After the chip-picker fix landed (commit 3e7b889), the remaining sub-44px
elements on /control were the two main page CTAs — "Bootstrap new project →"
at 225×36 and "Register existing project" at 221×38 — both using the
universal `ui-btn-secondary` SSOT class. Same story everywhere else: every
modal footer, settings form save/cancel pair, billing tier card, and
control-panel action that uses `ui-btn-primary` or `ui-btn-secondary` was
36px tall on mobile, under the WCAG 2.5.5 / iOS HIG 44px floor.

These three classes are used in 30+ places across the app — modals,
settings (account/profile/billing/team/projects/location/beacon/agent-token),
bootstrap-modal-steps, control-panel-helpers, project-profile-helpers,
PrivatePinGate. One change to globals.css, every secondary/primary/ghost
button gets a real mobile tap target.

Added `min-h-11 sm:min-h-0` to all three sibling button primitives. Same
trick already proven on ui-btn-add, ui-chip-toggle, ui-link-subtle,
ui-btn-ready-primary.

Verified live:
  • /control at 390×844: "Bootstrap new project →" 36 → 44; "Register
    existing project" 38 → 44; sub-44px count 3 → 1 (remaining is the
    icon-only "New" header button, intentional 14×44 on mobile).
  • /people at 390×844: zero sub-44px (Unlock was 36 → 44).
  • /control at 1280×800: secondary buttons stay at 38px, chips stay at
    26/34 — desktop look unchanged thanks to sm:min-h-0.

tsc + eslint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
g-butandClaude Opus 4.7 committed 2026-05-21 05:24:46 +02:00
1 parent 3e7b889e10
commit e811c50f3d
1 file changed
+7 -4
+7 -4
View File
@@ -608,15 +608,18 @@
}
.ui-input-inline:focus { @apply border-border-strong; }
/* Buttons */
/* Buttons.
min-h-11 sm:min-h-0 gives a real 44px tap target on mobile (WCAG 2.5.5 /
iOS HIG) while keeping the desktop py-2 (≈36px) compact look. Same trick
already used by ui-btn-add, ui-chip-toggle, ui-link-subtle. */
.ui-btn-primary {
@apply inline-flex items-center justify-center gap-2 rounded-lg bg-text-primary px-4 py-2 text-sm font-medium text-text-inverted transition-colors hover:opacity-90 active:opacity-80 disabled:opacity-40;
@apply inline-flex items-center justify-center gap-2 min-h-11 sm:min-h-0 rounded-lg bg-text-primary px-4 py-2 text-sm font-medium text-text-inverted transition-colors hover:opacity-90 active:opacity-80 disabled:opacity-40;
}
.ui-btn-secondary {
@apply inline-flex items-center justify-center gap-2 rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-secondary transition-colors hover:border-border-strong hover:text-text-primary disabled:opacity-40;
@apply inline-flex items-center justify-center gap-2 min-h-11 sm:min-h-0 rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-secondary transition-colors hover:border-border-strong hover:text-text-primary disabled:opacity-40;
}
.ui-btn-ghost {
@apply inline-flex items-center justify-center gap-2 rounded-lg px-3 py-2 text-sm text-text-tertiary transition-colors hover:bg-surface-raised hover:text-text-secondary disabled:opacity-40;
@apply inline-flex items-center justify-center gap-2 min-h-11 sm:min-h-0 rounded-lg px-3 py-2 text-sm text-text-tertiary transition-colors hover:bg-surface-raised hover:text-text-secondary disabled:opacity-40;
}
/* Small overlay button — card action chips (e.g. PersonCard quick-log) */
.ui-btn-chip {