From c8ea10c580ac04dd925a4cef1bc0fba595ecc9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 4 Nov 2026 14:06:23 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20a=20topic's=20own=20act?= =?UTF-8?q?ion=20is=20as=20wide=20as=20its=20words,=20so=20Delete=20releas?= =?UTF-8?q?e=20under=20a=20release=20is=20a=20small=20red=20pill=20instead?= =?UTF-8?q?=20of=20a=20band=20across=20the=20page=20=E2=9C=85=20test:=20me?= =?UTF-8?q?asure.ts=20reports=20a=20filled=20action=20stretched=20far=20pa?= =?UTF-8?q?st=20its=20words?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/audit/measure.ts | 6 ++++++ style/_one.scss | 3 +++ 2 files changed, 9 insertions(+) diff --git a/scripts/audit/measure.ts b/scripts/audit/measure.ts index ae90838..ef9c042 100644 --- a/scripts/audit/measure.ts +++ b/scripts/audit/measure.ts @@ -218,6 +218,12 @@ const ALIGN = `((root) => { if (Math.abs(mid(kb) - mid(a)) > 2) bad.push('acts row off centre ' + Math.round(mid(kb) - mid(a)) + 'px: ' + name(k)); } } + // A filled action is as wide as its words: one stretched across its row reads as a banner. + for (const e of root.querySelectorAll('a, button, summary')) { + if (!seen(e) || getComputedStyle(e).backgroundColor === 'rgba(0, 0, 0, 0)' || e.closest('.choice, .rail, .tabs, .menu-list, .tab-more-list, .palette-box, .swatches')) continue; + const t = line(e), b = e.getBoundingClientRect(); + if (t !== b && b.width - t.width > 120 && b.width > 2 * t.width) bad.push('stretched action ' + Math.round(b.width) + 'px for ' + Math.round(t.width) + 'px of words: ' + name(e)); + } for (const form of root.querySelectorAll('.fields')) { if (!seen(form) || form.getBoundingClientRect().width < 500) continue; const fields = [...form.querySelectorAll('.field')].filter((f) => seen(f) && f.closest('.fields') === form && getComputedStyle(f).display === 'grid'); diff --git a/style/_one.scss b/style/_one.scss index 55a58bd..3839dd0 100644 --- a/style/_one.scss +++ b/style/_one.scss @@ -3661,6 +3661,9 @@ details.log-group { .sec > :is(a.act, button.act), .sec > details > summary.act, .sec > form > button.act:only-of-type { + display: inline-flex; + align-items: center; + width: fit-content; height: var(--control-sm); margin-left: 0; padding: 0 14px;