Skip to content

feat: light chrome theme (chromeTheme prop) - #34

Merged
karngyan merged 5 commits into
mainfrom
feat/chrome-light-theme
Jul 23, 2026
Merged

feat: light chrome theme (chromeTheme prop)#34
karngyan merged 5 commits into
mainfrom
feat/chrome-light-theme

Conversation

@karngyan

Copy link
Copy Markdown
Collaborator

What

Adds light-theme support to kino's player chrome (control bar, captions, idle overlay, scrubber, flash, menus, compact/touch UI) via a new chromeTheme prop.

  • chromeTheme?: "light" | "dark" (default "dark") on PlayerProps and ScenesPlayerProps. Stamps data-kino-theme on the .kino root.
  • The chrome CSS was refactored so previously-hardcoded colors move onto --kino-* tokens. Each token's dark value equals the literal it replaced, so dark chrome is byte-for-byte unchanged. A new .kino[data-kino-theme="light"] block defines light-glass token values (translucent white surfaces, dark text/icons, black-alpha borders/tracks).
  • Distinct from the existing sceneTheme, which themes the scene stage inside the iframe. chromeTheme styles kino's own chrome in the parent document.
  • Demo: a chrome light/dark toggle on the /theming page (drives the Scenes tab, the only wrapper that forwards chromeTheme today).

Why

The karnstack app is migrating a full course to the scenes player and needs the player chrome to read correctly in light theme, not just the scene canvas.

Safety

  • Dark rendering is unchanged (default is "dark", token dark values verbatim). Verified token-by-token in review.
  • chromeTheme is destructured out before the scenes provider options, so it never leaks into createScenesProvider. sceneTheme / theme / accentColor untouched.
  • New test asserts the data-kino-theme attribute for both explicit light and the dark default. 203/203 pass; format/typecheck/lint/build clean.

Changeset: minor.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
kino 3aaf6f7 Commit Preview URL

Branch Preview URL
Jul 23 2026, 12:52 PM

@karngyan
karngyan merged commit e7b5f5a into main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant