From 01e0da9022a3c11689a2d04e418af2d35c6c2449 Mon Sep 17 00:00:00 2001 From: Mitchell-Johnson Date: Sat, 24 Oct 2026 00:02:15 -0700 Subject: [PATCH] =?UTF-8?q?files:=20no=20theme=20touches=20playback=20?= =?UTF-8?q?=E2=80=94=20Retro's=20scanlines=20off=20while=20a=20video=20is?= =?UTF-8?q?=20open,=20plain=20font?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- web/scripts/e2e-player.mjs | 14 ++++++++++++++ web/src/styles.css | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/web/scripts/e2e-player.mjs b/web/scripts/e2e-player.mjs index 2e455e6..ac379ee 100644 --- a/web/scripts/e2e-player.mjs +++ b/web/scripts/e2e-player.mjs @@ -67,6 +67,20 @@ if (await page.locator('canvas.vp-sphere').count()) { } await page.screenshot({ path: `${SHOTS}/h1-auto.png` }) +// No theme touches playback: under Retro the scanlines are off and the controls keep a plain font. +{ + const was = await page.evaluate(() => document.documentElement.getAttribute('data-theme')) + await page.evaluate(() => document.documentElement.setAttribute('data-theme', 'retro')) + const r = await page.evaluate(() => { + const app = document.querySelector('.app') + const over = app ? getComputedStyle(app, '::after').display : 'none' + const font = getComputedStyle(document.querySelector('.vp button')).fontFamily + return { over, font } + }) + check('Retro leaves the video alone', r.over === 'none' && !/mono|courier/i.test(r.font), JSON.stringify(r)) + await page.evaluate((t) => t ? document.documentElement.setAttribute('data-theme', t) : document.documentElement.removeAttribute('data-theme'), was) +} + // The 5-second buttons: back and on, the ball with them. { await controls() diff --git a/web/src/styles.css b/web/src/styles.css index dafcde4..cfd9b89 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -971,3 +971,8 @@ pre.diff .add { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, .vp-time.above { display: block; padding: 0 10px 2px; } .vp-time.inrow { display: none; } } + +/* No theme touches playback: the Retro scanlines (a full-window overlay) are off while a video + is open, and the player keeps one plain font whatever the theme's. */ +[data-theme] .app:has(.vp)::after { display: none; } +.vp, .vp button, .vp input { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }