oficina / slides Public

Editor: the strip's menu button keeps its 44px target, drawn at 28px

Where rastrillo makes every control a 44px touch target (a coarse
pointer, or 40rem and under), the strip's ⋮ grew to a 44px box that
covered the thumbnail's title at 320px. It keeps the 44px target, but
the box is now see-through and the button is drawn at its usual 28px,
in its usual place.

The bar's divider and account still wrap onto a row of their own at
320px. Keeping them on the row before needs 55px that row does not
have, which is more than a small CSS change, so it is left as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev de034816e106a245aea771423a6d90dd9bda6380 parent ba9eb40
2 files changed, +48 −0
  • internal/slides/static/editor.css +31 −0
  • internal/slidestest/browser_quieter_test.go +17 −0
diff --git a/internal/slides/static/editor.css b/internal/slides/static/editor.css
index 8b75a2c..af09d1d 100644
--- a/internal/slides/static/editor.css
+++ b/internal/slides/static/editor.css
@@ -1855,6 +1855,37 @@ summary[slides-card-row]::-webkit-details-marker {
[slides-strip-item][draggable] {
cursor: grab;
}
+/* Where rastrillo makes every control a 44px touch target (tokens.css),
+ the ⋮ keeps that target but is drawn as the 28px button it is
+ elsewhere, in the same place: the 44px box is the summary, see-through,
+ and the button is drawn under its icon. A 44px box covered the
+ thumbnail's title at 320px. */
+@media (pointer: coarse), (max-width: 40rem) {
+ [slides-strip-menu] {
+ right: calc(var(--rst-sp-2) - 4px);
+ top: calc(var(--rst-sp-2) - 6px);
+ }
+ [slides-strip-menu] > summary,
+ [slides-strip-menu] > summary:hover {
+ background: none;
+ border-color: transparent;
+ isolation: isolate;
+ position: relative;
+ }
+ [slides-strip-menu] > summary::before {
+ background: var(--slides-strip-menu-ground);
+ border: 1px solid var(--rst-line-strong);
+ border-radius: inherit;
+ box-sizing: border-box;
+ content: '';
+ inset: 8px;
+ position: absolute;
+ z-index: -1;
+ }
+ [slides-strip-menu] > summary:hover::before {
+ border-color: var(--rst-accent);
+ }
+}
[slides-strip-item][data-dragging] {
opacity: 0.5;
}
diff --git a/internal/slidestest/browser_quieter_test.go b/internal/slidestest/browser_quieter_test.go
index de976af..0baf8eb 100644
--- a/internal/slidestest/browser_quieter_test.go
+++ b/internal/slidestest/browser_quieter_test.go
@@ -441,6 +441,23 @@ func TestQuieterNarrow(t *testing.T) {
t.Errorf("at 1000x800: %s", got)
}
te.size(320, 700)
+ // The strip's ⋮ keeps the 44px touch target, but what is drawn of it
+ // stays the compact button it is elsewhere, not a 44px box over the
+ // thumbnail's title (review).
+ var menu string
+ // rastrillo's buttons ease their ground and border: measured settled.
+ te.rig.Run(chromedp.Sleep(400*time.Millisecond), chromedp.Evaluate(`(() => {
+ const s = document.querySelector('[slides-strip-item][data-current="true"] [slides-strip-menu] > summary'), r = s.getBoundingClientRect(), out = []
+ if (r.width < 44 || r.height < 44) out.push('the target is ' + r.width + 'x' + r.height + ', under 44x44')
+ const own = getComputedStyle(s), before = getComputedStyle(s, '::before')
+ const plain = own.backgroundColor === 'rgba(0, 0, 0, 0)' && own.borderTopColor === 'rgba(0, 0, 0, 0)'
+ const drawn = plain && before.content !== 'none' ? [parseFloat(before.width), parseFloat(before.height)] : [r.width, r.height]
+ if (!(drawn[0] <= 32 && drawn[1] <= 32)) out.push('what is drawn is ' + drawn.join('x') + ', over 32x32 (ground ' + own.backgroundColor + ', border ' + own.borderTopColor + ')')
+ return out.join('; ')
+ })()`, &menu))
+ if menu != "" {
+ t.Errorf("at 320x700 the strip's menu button: %s", menu)
+ }
if got := popoversInWindow(t, te); got != "" {
t.Errorf("at 320x700: %s", got)
}