files: no theme touches playback — Retro's scanlines off while a video is open, plain font
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dbf89cd5e2
commit
01e0da9022
@@ -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()
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user