fix(skin): migrate publisher skin to the stabilized css token vocabulary

Merged
MM
3mo ago
+104-104

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-color now 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-color instead of falling back to currentColor
  • Publisher-only tokens follow the unprefixed internal convention (--publish-live-color, --quality-*-color, --publish-status-background); dangling --media-current-shadow-color / --media-color-primary references repointed
  • --media-capture-placeholder-background is 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
beforeafter
hover paints nothing, no glass surface behind the menuanchored 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 publisher skin.css contains 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-color to --shadow-current-color and removes reliance on --media-color-primary where used.
  • Stops defining --media-capture-placeholder-background on the container so host-level overrides take effect.
  • CSS and Tailwind variants updated in lockstep; @videojs/skins tests 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-background overrides.