Coarse pointers from 64rem: the inspector's pickers keep 16px; the lead pair is 32px
The inspector's 13px outweighed the strip's max(1rem, 1em), so iOS zoomed into its pickers on a wide touch screen (review on #106, P2.2); restated at the inspector's weight. The header's undo/redo are 32x32 in a 32px pill there (P3). TestNoZoomOnTap gains a 1280px touch leg that measures both; seen to fail at 13px and at 30x28.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+33
−2
internal/docs/views/show.html+14 −2internal/docs/zoom_browser_test.go+19 −0
CI cancelled — superseded by a newer push — run details
diff --git a/internal/docs/views/show.html b/internal/docs/views/show.html| index 8d70fd7..ae51584 100644 |
| --- a/internal/docs/views/show.html |
| +++ b/internal/docs/views/show.html |
| @@ -1307,8 +1307,12 @@ |
| @media (hover: hover) and (min-width: 40rem) { |
| [docs-history~="lead"] [docs-tool]::after { inset-block-start: calc(100% + 6px); } |
| } |
| + /* Coarse pointers: the pair's buttons are 32px each way (review on |
| + #106: they were 30x28), and the pill is theirs, 32px, the height |
| + estilo gives the other header controls there. */ |
| @media (pointer: coarse) { |
| - [docs-history~="lead"] [docs-tool] { min-block-size: 28px; block-size: 28px; } |
| + [docs-history~="lead"] { padding: 0; } |
| + [docs-history~="lead"] [docs-tool] { min-inline-size: 32px; min-block-size: 32px; block-size: 32px; } |
| } |
| /* The inspector's box. Below 64rem it is only the strip's holder, |
| @@ -1490,7 +1494,11 @@ |
| [docs-inspector] [rst-combo]:has([rst-input]:disabled)::after { |
| cursor: default; |
| } |
| - /* Coarse pointers: every control rises to 32px. */ |
| + /* Coarse pointers: every control rises to 32px, and the pickers keep |
| + the 16px floor the strip's rule gives them (iOS zooms into a text |
| + control under 16px): the inspector's 13px above outweighs that |
| + rule, so it is restated here, at this weight (review on #106; |
| + TestNoZoomOnTap's wide leg). */ |
| @media (pointer: coarse) { |
| [docs-inspector] [docs-toolbar-group]:not([docs-toolbar-group="style"]) [docs-tool], |
| [docs-inspector] [rst-combo] [rst-input], |
| @@ -1498,6 +1506,10 @@ |
| min-block-size: 32px; |
| block-size: 32px; |
| } |
| + [docs-inspector] [rst-combo] [rst-input], |
| + [docs-inspector] [docs-tool-select] { |
| + font-size: max(1rem, 1em); |
| + } |
| } |
| /* The light (rastrillo's card light: light.js eases --rst-card-x, |
| -y and -lit on any [rst-box]). The rim brightens and the face |
diff --git a/internal/docs/zoom_browser_test.go b/internal/docs/zoom_browser_test.go| index feabbb2..094daf6 100644 |
| --- a/internal/docs/zoom_browser_test.go |
| +++ b/internal/docs/zoom_browser_test.go |
| @@ -130,6 +130,25 @@ func TestNoZoomOnTap(t *testing.T) { |
| chromedp.WaitVisible(`[estilo-bar-title-input], [docs-toolbar] input, [docs-toolbar] select`, chromedp.ByQuery)) |
| // The share page, then published: the link field shows only in the |
| // one render that follows the publish. |
| + // A wide touch screen (an iPad in landscape, 1280px): from 64rem the |
| + // toolbar is the inspector (spec I2), whose own font size beat the |
| + // strip's max(1rem, 1em) and dropped its pickers to 13px (review on |
| + // #106). |
| + // The header's undo/redo are 32px targets there too, in a 32px pill. |
| + var inspector string |
| + var lead []float64 |
| + run("a wide touch screen", emulation.SetDeviceMetricsOverride(1280, 900, 1, false)) |
| + measure("/d/"+sqid, `[contenteditable="true"]`, |
| + chromedp.WaitVisible(`[docs-inspector] [docs-toolbar] input`, chromedp.ByQuery), |
| + chromedp.Evaluate(`getComputedStyle(document.querySelector('[docs-inspector]')).position`, &inspector), |
| + chromedp.Evaluate(`(() => { const b = document.querySelector('[estilo-bar-lead] [data-docs-command="undo"]').getBoundingClientRect(); const p = document.querySelector('[estilo-bar-lead] [docs-history]').getBoundingClientRect(); return [b.width, b.height, p.height] })()`, &lead)) |
| + if inspector != "fixed" { |
| + t.Errorf("at 1280px the toolbar is not the inspector (position %q); this measured the strip", inspector) |
| + } |
| + if len(lead) != 3 || lead[0] < 32 || lead[1] < 32 || lead[2] != 32 { |
| + t.Errorf("on a touch screen the header's undo is %vx%v in a %vpx pill, want 32x32 in 32", lead[0], lead[1], lead[2]) |
| + } |
| + run("back to the default width", emulation.ClearDeviceMetricsOverride()) |
| measure("/d/"+sqid+"/share", `input[name="address"]`) |
| if rec := sameOrigin("/d/"+sqid+"/share/link", "on=1"); rec.Code != http.StatusSeeOther { |
| t.Fatalf("publishing: %d", rec.Code) |