Give buttons and links the same box #69
Closed
jheaps
wants to merge 1 commits from
fix/casino-holdem-button-box-model into fix/casino-holdem-blind-badge-placement
pull from: fix/casino-holdem-button-box-model
merge into: :fix/casino-holdem-blind-badge-placement
:master
:feature/socialism
:polish/holdem-seats-one-size
:fix/holdem-dealer-chip-eats-its-seat
:polish/holdem-game-night-ready
:polish/holdem-round-next
:polish/holdem-seat-collisions
:polish/holdem-offline-and-render
:fix/naming-a-blind-deals-the-hand
:release/casino-holdem-polish
:fix/casino-holdem-phone-look
:fix/casino-holdem-sidebar-crowding
:fix/casino-holdem-contribution-rule
:fix/casino-holdem-one-stack-rule
:fix/casino-holdem-default-stack-buyin
:feat/casino-holdem-waiting-list
:feat/casino-holdem-misdeal
:feat/casino-holdem-cash-out
:feat/casino-holdem-clock
:feat/casino-holdem-rake
:fix/casino-holdem-stadium-ring
:fix/casino-holdem-phone-felt-shape
:fix/casino-holdem-audit-runs-everything
:feat/casino-holdem-straddle
:fix/casino-holdem-landscape-ring
:feat/casino-holdem-table-file
:fix/casino-holdem-touch-targets
:fix/casino-holdem-audit-modal-blindspot
:fix/casino-holdem-quicksplit-chop
:fix/casino-holdem-buildable-bet-sizes
:fix/casino-holdem-pot-sized-raise
:fix/casino-holdem-chips-to-count-out
:fix/casino-holdem-first-buy-in
:fix/casino-holdem-seating-a-table
:fix/casino-holdem-showdown-order
:fix/casino-holdem-hand-log-filter
:fix/casino-holdem-posting-in
:fix/casino-holdem-dead-button
:fix/casino-holdem-discarded-pot
:fix/casino-holdem-honest-tank-clock
:fix/casino-holdem-export-the-notes
:fix/casino-holdem-stacks-in-chips
:fix/casino-holdem-close-audit-blind-spots
:fix/casino-holdem-readable-dim-states
:fix/casino-holdem-drop-broken-watermark
:fix/casino-holdem-two-tabs
:fix/casino-holdem-unreadable-save
:fix/casino-holdem-say-when-not-saving
:fix/casino-holdem-shortcut-discovery
:fix/casino-holdem-rulings-index-compact
:fix/casino-holdem-rulings-index
:fix/casino-holdem-payout-in-chips
:fix/casino-holdem-move-seat-on-touch
:fix/casino-holdem-amount-fields-select
:fix/casino-holdem-touch-targets-by-pointer
:fix/casino-holdem-button-box-model
:fix/casino-holdem-blind-badge-placement
:fix/casino-holdem-buyin-deals-in
:fix/casino-holdem-bet-vs-raise
:fix/casino-holdem-deal-around-broke
:fix/casino-holdem-settle-up
:fix/casino-holdem-allin-and-bar
:fix/casino-holdem-one-dealer-button
:fix/casino-holdem-manual-deal
:fix/casino-holdem-less-guessing
:feature/casino-holdem-seat-editor
:fix/casino-holdem-landscape-table
:feature/casino-holdem-acting-seat
:feature/casino-holdem-raise-guard
:feature/casino-holdem-first-run
:feature/casino-holdem-contrast-audit
:feature/casino-holdem-layout-audit
:feature/casino-holdem-blind-fairness
:feature/casino-holdem-rulings-depth
:feature/casino-holdem-bank-audit
:feature/casino-holdem-fewer-taps
:feature/casino-holdem-render-perf
:feature/casino-holdem-keyboard-focus
:feature/casino-holdem-resilience
:feature/casino-holdem-messy-tables
:feature/casino-holdem-touch-mobile
:chore/casino-holdem-tech-debt
:feature/casino-holdem-dealer-batch
:feature/casino-holdem-seat-count-safety
:feature/casino-holdem-odd-chip
:feature/casino-holdem-button-moves
:feature/casino-holdem-allin-runout
:feature/casino-holdem-heads-up
:feature/casino-holdem-contrast
:feature/casino-holdem-touch-audit
:feature/casino-holdem-wizard-polish
:feature/casino-quicksplit-side-pots
:feature/casino-holdem-rebuys
:feature/casino-holdem-rulings
:feature/casino-holdem-sidebar-polish
:feature/casino-holdem-keyboard
:feature/casino-holdem-action-undo
:feature/casino-holdem-pace
:feature/casino-holdem-side-pot-breakdown
:feature/casino-holdem-gestures
:feature/casino-holdem-card-picker
:feature/casino-holdem-live-betting
:feature/casino-holdem-bet-chips
:feature/casino-holdem-seat-legibility
:feature/casino-holdem-undo-toasts
:feature/casino-holdem-quick-split
:feature/casino-holdem-mobile-table
:feature/casino-holdem-hand-history
:feature/casino-texas-holdem
:feature/casino-holdem-dealer-mode-polish
:feature/fractional-learned-weights
:fix/stockfish-dispose-hang
:fix/blog-cache-staleness
:fix/workflows
:gitea/workflows
:echo-acoustic-ranging
:chess-ui-overhaul
:feature/customChessEngine
:feature/blog
:AddProject
:feature/generalUpdate
:tech-debt/chess-cleanup
:tests/CreatePlaywrightTests
:UpdateParticleSimulatorButton
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The header on a portrait phone was 227px — a quarter of the screen — before the table started, and at 360x640 the bottom of the table sat 16px behind the action bar with the gesture hint off screen entirely. Stacked on #68.
Chasing where the pixels went turned up something better than a tight header.
.holdemBtnis worn by three<button>s and two<a>s. The class never stated a box model, and the browser doesn't give those two tags the same one: Chromium makes a buttonborder-boxand leaves a linkcontent-box. Somin-height: 46pxon the header row came out as 46px on the buttons and 46 + 16 padding + 2 border = 64px on the links — and a flex row is as tall as its tallest item, so all five became 64px.A 46px touch target was costing 64px of screen, twice over, because the header wraps to two rows on a phone.
The half I wasn't looking for
The 46px floor only exists under the 700px breakpoint, and the accidental stretch was the only reason anything above it was big enough to press. Once the boxes agree, a landscape phone — wider than the breakpoint, still a thumb — would have been left with 42px buttons. So the 44px floor is now stated on the class itself:
.holdemBtnunder 44pxThat's every button on the page, not just the header: the panel buttons, the pot wizard, the confirm dialogs.
What it costs
844x390 loses 2px of table clearance (−5 → −7) because its header grows with the buttons. That size already has the bottom seat behind the bar (#63), and 13 unpressable controls was the worse of the two problems.
Validation
Baseline measured by stashing the change and re-serving, so the before/after is the same instrument on the same build. 214 tests still passing; layout audit and contrast clean at 9 sizes; no console errors; every header button still hit-testable at 121x46 and 112x46.
The header on a portrait phone was 227px -- a quarter of the screen -- before the table started, and at 360x640 the bottom of the table sat 16px behind the action bar with the gesture hint off screen entirely. Chasing where the pixels went turned up something better than a tight header. .holdemBtn is worn by three <button>s and two <a>s. The class never stated a box model, and the browser does not give those two tags the same one: Chromium makes a button border-box and leaves a link content-box. So `min-height: 46px` on the header row came out as 46px on the buttons and 46 + 16 padding + 2 border = 64px on the links -- and a flex row is as tall as its tallest item, so all five became 64px. A 46px touch target was costing 64px of screen, twice over, because the header wraps to two rows on a phone. 390x844 header 227 -> 191 buttons 64 -> 46 412x915 header 227 -> 191 430x932 header 227 -> 191 360x640 header 173 -> 137 table clearance -16px -> +20px, so the felt now clears the action bar instead of running under it The other half is the one I did not go looking for. The 46px floor only exists under the 700px breakpoint, and the accidental stretch was the only reason anything above it was big enough to press. Once the boxes agree, a landscape phone -- wider than the breakpoint, still a thumb -- would have been left with 42px buttons. So the 44px floor is stated on the class itself. Measured across the page: 844x390 13 .holdemBtn under 44px -> 0 915x412 13 -> 0 1280x900 13 -> 0 That is every button on the page, not just the header: the panel buttons, the pot wizard, the confirm dialogs. What it costs: 844x390 loses 2px of table clearance, -5 to -7, because its header grows with the buttons. That size already has the bottom seat behind the bar (#63), and 13 unpressable controls was the worse of the two problems. 214 tests still passing; layout audit and contrast clean at 9 sizes; no console errors; every header button still hit-testable at 46x121 and 46x112. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgbPull request closed