fix(skin): migrate publisher skin to the stabilized css token vocabulary
Merged
MM
3mo ago+104+104+012345678901234567890123456789-104-104-012345678901234567890123456789
Summary
The css cleanup in videojs#2094 (merged in via the last mmcc/moq sync) renamed the default skin's internal tokens from --media-* to unprefixed names, reserving --media-* for user-facing overrides read through var() fallbacks. The publisher skin still defined the old vocabulary, so every style derived from those tokens silently resolved to nothing.
Changes
- Menu item and subtle-button hover highlights are back (
--accent-background-colornow derives from a defined--default-accent-color) - Glass surface fill/blur/borders restored on the controls bar, menus, and tooltips (
--surface-*) - Popup open/close transitions animate again (
--popup-transition-*), and the focus ring uses--focus-ring-colorinstead of falling back tocurrentColor - Publisher-only tokens follow the unprefixed internal convention (
--publish-live-color,--quality-*-color,--publish-status-background); dangling--media-current-shadow-color/--media-color-primaryreferences repointed --media-capture-placeholder-backgroundis no longer defined on the container โ it is a public override knob consumed via fallback, and the root definition was blocking host-level overrides- CSS and Tailwind skin variants updated in lockstep
| before | after |
|---|---|
| hover paints nothing, no glass surface behind the menu | anchored translucent pill highlight + glass surface, matching the base video skin |
Testing
pnpm -F @videojs/skins test(39 passed, includes canonical import check and type pass)turbo run build --filter=@videojs/html --filter=@videojs/reactโ bundled publisherskin.csscontains only new-vocabulary tokens- Headless Chromium check against the built css: hovered menu item paints the anchored
oklch(1 0 0 / 0.1)highlight, subtle button hover resolves the same accent background
๐ค Generated with Claude Code
Summary by cubic
Restores publisher skin visuals by migrating from deprecated --media-* internal tokens to the stabilized unprefixed vocabulary. Previously, hover highlights, glass surfaces, popup transitions, and the focus ring resolved to nothing; now they render as intended.
- Renames internal tokens to
--surface-*,--popup-transition-*,--controls-transition-*,--error-dialog-transition-*,--default-accent-color, and--focus-ring-color. Publisher-only tokens now use--publish-live-color,--quality-*-color, and--publish-status-background. - Repoints
--media-current-shadow-colorto--shadow-current-colorand removes reliance on--media-color-primarywhere used. - Stops defining
--media-capture-placeholder-backgroundon the container so host-level overrides take effect. - CSS and Tailwind variants updated in lockstep;
@videojs/skinstests pass and bundles contain only the new vocabulary.
Migration
- If you override publisher-only tokens, update:
--media-publish-live-colorโ--publish-live-color,--media-quality-{good,fair,poor}-colorโ--quality-{good,fair,poor}-color,--media-publish-status-backgroundโ--publish-status-background. No change needed for host-level--media-capture-placeholder-backgroundoverrides.