Skip to content

feat(site): tailwind style preference + tailwind demo variants#1684

Draft
decepulis wants to merge 7 commits into
mainfrom
claude/vigilant-knuth-5b8c1i
Draft

feat(site): tailwind style preference + tailwind demo variants#1684
decepulis wants to merge 7 commits into
mainfrom
claude/vigilant-knuth-5b8c1i

Conversation

@decepulis

@decepulis decepulis commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enables tailwind as a docs style preference (refs #840) and adds Tailwind variants for the API reference demos, gated on the existing style preference plumbing.

  • Style support: tailwind added to FRAMEWORK_STYLES / STYLE_LABELS — the style selector, <StyleCase> gating, before-paint init, and ?style=tailwind deep links all derive from this.
  • Theme support for demos: the site's Tailwind theme resets the default color/text scales, so the stock tokens demos rely on (gray-*, blue-500, neutral-*, text-xs, text-sm) are re-declared verbatim in a dedicated @theme block in globals.css. Demo snippets stay copy-paste compatible with a stock Tailwind v4 setup. Follow-up Chore: Replace Demo-Support @theme Tokens with a Scoped Stock Tailwind Stylesheet for Docs Demos #1685 tracks replacing this with a scoped, demo-only stock Tailwind stylesheet so these tokens don't live in the site's global theme.
  • Customize-skins guide: surfaces the existing Tailwind ejected-skin variants behind <StyleCase> (closes out the original Docs: Add Tailwind as a Supported Style for Documentation #840 task list).
  • Demo variants: html/tailwind/ and react/tailwind/ variants for all reference demos, mirroring the css/ variants 1:1 — same markup, utilities inline, state reflection via data-paused: / in-data-paused: variants instead of attribute selectors. The style-agnostic thumbnail JSON demos (no stylesheet) are shared across both styles instead of duplicated. The player-controller demo keeps its play/pause/volume classes as JS hooks (querySelector targets).

Update after reopen (2026-07-02)

Merged main and brought the branch up to date with demos added to the docs since the PR was written:

  • Tailwind variants (html + react) for the new media element references: background-video, cast-button, dash-video, hlsjs-video, mux-audio, mux-video, native-hls-video, simple-hls-video, simple-hls-audio-only, plus the react-only use-media reference — wired into their pages behind <StyleCase styles={["tailwind"]}>. React demos on the media element pages stay source-only, matching their css variants until Bug: React Media Components Break SSR — Top-Level hls.js/dashjs Imports Access window #1343 lands.
  • Synced the tooltip react Tailwind demos with the Tooltip.Label change the css variants picked up on main.
  • No new theme tokens needed — the new demos only use stock utilities already covered (aspect-video, spacing scale, gray-500).

Verification

  • All Tailwind classes used by demos compile against the site build (re-verified with a @tailwindcss/node compile check over all 78 tailwind demo files; only intentional JS-hook classes don't generate)
  • Site unit tests pass (480/480 after merge)
  • Production site build passes (pnpm build:site)
  • pnpm typecheck and pnpm check:workspace pass
  • Visual spot-check of demo parity on the deploy preview

Notes for review

  • Both style variants of a demo are present in the DOM and gated with display: none via html[data-style], so reference pages now mount two copies of each demo (hidden videos still load). Same mechanism the css demos already used for framework gating, but worth knowing for page-weight expectations.
  • Known approximations from the CSS variants (all guide-sanctioned): ease timing → Tailwind default timing function, text-* utilities also set line-height, #cccgray-300, #1a1a1aneutral-900.

Refs #840, follow-up: #1685

https://claude.ai/code/session_01LUcwUd8E4Ekakp7NTFb6c5

Adds 'tailwind' to FRAMEWORK_STYLES and STYLE_LABELS so the style
selector, StyleCase gating, and ?style= deep links support it.
Re-declares the stock Tailwind color/text tokens consumed by docs
demos in a dedicated @theme block (the site theme resets those
scales), and surfaces the existing Tailwind ejected-skin variants on
the customize-skins guide.

Refs #840

https://claude.ai/code/session_01LUcwUd8E4Ekakp7NTFb6c5
@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 876493f
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a46fbd637430400080454e6
😎 Deploy Preview https://deploy-preview-1684--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Jul 3, 2026 12:01am

Request Review

Adds react/tailwind and html/tailwind demo variants for create-player,
html-create-player, player-controller, render-element, use-button,
use-player, and use-store, gated on the style preference via StyleCase.

Refs #840

https://claude.ai/code/session_01LUcwUd8E4Ekakp7NTFb6c5
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Initial
/video (default) 46.24 kB
/video (default + hls) 185.87 kB
/video (minimal) 46.25 kB
/video (minimal + hls) 185.90 kB
/audio (default) 39.78 kB
/audio (minimal) 38.93 kB
/background 4.20 kB
Media (10)
Entry Initial
/media/background-video 1.14 kB
/media/container 1.72 kB
/media/dash-video 214.72 kB
/media/hlsjs-video 141.49 kB
/media/mux-audio 163.89 kB
/media/mux-video 163.96 kB
/media/native-hls-video 9.05 kB
/media/simple-hls-audio-only 17.15 kB
/media/simple-hls-video 18.72 kB
/media/vimeo-video 12.31 kB
Players (5)
Entry Initial
/video/player 8.22 kB
/audio/player 5.38 kB
/background/player 3.92 kB
/live-video/player 7.64 kB
/live-audio/player 5.39 kB
Skins (30)
Entry Type Initial
/video/minimal-skin.css css 5.65 kB
/video/skin.css css 5.61 kB
/video/minimal-skin js 46.21 kB
/video/minimal-skin.tailwind js 46.93 kB
/video/skin js 46.24 kB
/video/skin.tailwind js 47.02 kB
/audio/minimal-skin.css css 3.93 kB
/audio/skin.css css 3.82 kB
/audio/minimal-skin js 38.94 kB
/audio/minimal-skin.tailwind js 39.43 kB
/audio/skin js 39.79 kB
/audio/skin.tailwind js 40.30 kB
/background/skin.css css 133 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 5.65 kB
/live-video/skin.css css 5.61 kB
/live-video/minimal-skin js 45.25 kB
/live-video/minimal-skin.tailwind js 45.87 kB
/live-video/skin js 44.86 kB
/live-video/skin.tailwind js 45.52 kB
/live-audio/minimal-skin.css css 3.93 kB
/live-audio/skin.css css 3.82 kB
/live-audio/minimal-skin js 31.54 kB
/live-audio/minimal-skin.tailwind js 30.98 kB
/live-audio/skin js 32.54 kB
/live-audio/skin.tailwind js 32.01 kB
/global.css css 176 B
/shared.css css 104 B
/tailwind.css css 161 B
/skin-element js 1.45 kB
UI Components (39)
Entry Initial
/ui/airplay-button 2.41 kB
/ui/alert-dialog 2.55 kB
/ui/alert-dialog-close 2.17 kB
/ui/alert-dialog-description 2.11 kB
/ui/alert-dialog-title 2.16 kB
/ui/audio-track-radio-group 2.84 kB
/ui/buffering-indicator 2.28 kB
/ui/captions-button 2.40 kB
/ui/captions-radio-group 2.84 kB
/ui/cast-button 2.42 kB
/ui/compounds 2.85 kB
/ui/controls 2.59 kB
/ui/error-dialog 2.60 kB
/ui/fullscreen-button 2.36 kB
/ui/hotkey 2.32 kB
/ui/menu 2.66 kB
/ui/mute-button 2.45 kB
/ui/pip-button 2.39 kB
/ui/play-button 2.39 kB
/ui/playback-rate-button 2.45 kB
/ui/playback-rate-radio-group 2.77 kB
/ui/popover 2.74 kB
/ui/poster 2.24 kB
/ui/quality-radio-group 2.82 kB
/ui/seek-button 2.41 kB
/ui/seek-indicator 2.43 kB
/ui/seek-indicator-value 418 B
/ui/slider 2.63 kB
/ui/status-announcer 2.32 kB
/ui/status-indicator 2.38 kB
/ui/status-indicator-value 422 B
/ui/thumbnail 2.21 kB
/ui/time 2.60 kB
/ui/time-slider 2.64 kB
/ui/tooltip 2.67 kB
/ui/volume-indicator 2.34 kB
/ui/volume-indicator-fill 444 B
/ui/volume-indicator-value 366 B
/ui/volume-slider 2.63 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Initial
/video (default) 38.33 kB
/video (default + hls) 176.58 kB
/video (minimal) 38.69 kB
/video (minimal + hls) 177.08 kB
/audio (default) 31.54 kB
/audio (minimal) 31.61 kB
/background 754 B
Media (9)
Entry Initial
/media/background-video 575 B
/media/dash-video 213.16 kB
/media/hlsjs-video 140.07 kB
/media/mux-audio 162.52 kB
/media/mux-video 162.57 kB
/media/native-hls-video 7.41 kB
/media/simple-hls-audio-only 15.56 kB
/media/simple-hls-video 17.14 kB
/media/vimeo-video 10.58 kB
Skins (27)
Entry Type Initial
/tailwind.css css 161 B
/video/minimal-skin.css css 5.55 kB
/video/skin.css css 5.52 kB
/video/minimal-skin js 38.65 kB
/video/minimal-skin.tailwind js 44.67 kB
/video/skin js 38.25 kB
/video/skin.tailwind js 44.31 kB
/audio/minimal-skin.css css 3.79 kB
/audio/skin.css css 3.68 kB
/audio/minimal-skin js 31.56 kB
/audio/minimal-skin.tailwind js 33.75 kB
/audio/skin js 31.48 kB
/audio/skin.tailwind js 35.73 kB
/background/skin.css css 90 B
/background/skin js 272 B
/live-video/minimal-skin.css css 5.55 kB
/live-video/skin.css css 5.52 kB
/live-video/minimal-skin js 33.42 kB
/live-video/minimal-skin.tailwind js 39.37 kB
/live-video/skin js 33.43 kB
/live-video/skin.tailwind js 39.43 kB
/live-audio/minimal-skin.css css 3.79 kB
/live-audio/skin.css css 3.68 kB
/live-audio/minimal-skin js 22.45 kB
/live-audio/minimal-skin.tailwind js 25.59 kB
/live-audio/skin js 22.52 kB
/live-audio/skin.tailwind js 25.65 kB
UI Components (33)
Entry Initial
/ui/airplay-button 2.22 kB
/ui/alert-dialog 2.16 kB
/ui/audio-track 2.14 kB
/ui/buffering-indicator 2.13 kB
/ui/captions-button 2.23 kB
/ui/captions-radio-group 2.11 kB
/ui/cast-button 2.20 kB
/ui/controls 2.06 kB
/ui/error-dialog 2.27 kB
/ui/fullscreen-button 2.21 kB
/ui/gesture 2.29 kB
/ui/hotkey 2.21 kB
/ui/live-button 2.15 kB
/ui/menu 2.29 kB
/ui/mute-button 2.24 kB
/ui/pip-button 2.23 kB
/ui/play-button 2.22 kB
/ui/playback-rate 2.13 kB
/ui/playback-rate-button 2.22 kB
/ui/popover 2.67 kB
/ui/poster 2.03 kB
/ui/quality 2.08 kB
/ui/seek-button 2.22 kB
/ui/seek-indicator 2.10 kB
/ui/slider 2.27 kB
/ui/status-announcer 2.16 kB
/ui/status-indicator 2.09 kB
/ui/thumbnail 2.03 kB
/ui/time 2.08 kB
/ui/time-slider 2.22 kB
/ui/tooltip 2.63 kB
/ui/volume-indicator 2.09 kB
/ui/volume-slider 2.21 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (14)
Entry Initial
. 9.40 kB
/dom 17.58 kB
/dom/media/custom-media-element 2.09 kB
/dom/media/dash 208.96 kB
/dom/media/google-cast 4.04 kB
/dom/media/hls-js 136.00 kB
/dom/media/media-host 1.25 kB
/dom/media/media-played-ranges 576 B
/dom/media/mux 151.26 kB
/dom/media/native-hls 3.07 kB
/dom/media/simple-hls 16.49 kB
/dom/media/simple-hls-audio-only 14.92 kB
/dom/media/vimeo 9.86 kB
/media/predicate 563 B
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.39 kB
/html 696 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Initial
/array 104 B
/dom 2.26 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 231 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (4)
Entry Initial
. 4.45 kB
/dom 6.33 kB
/hls 15.37 kB
/background-video 12.85 kB

ℹ️ How to interpret

JS sizes are initial static graph totals (minified + brotli). Lazy dynamic chunks are shown separately when present.

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current initial sizes.

… references

The thumbnail JSON demos have no stylesheet-dependent code, so they are
shared across both style preferences instead of duplicated.

Refs #840

https://claude.ai/code/session_01LUcwUd8E4Ekakp7NTFb6c5
Covers airplay-button, buffering-indicator, captions-button, controls,
playback-rate-button, poster, and popover.

Refs #840

https://claude.ai/code/session_01LUcwUd8E4Ekakp7NTFb6c5
claude added 2 commits July 2, 2026 23:45
…ferences

Bring the tailwind style support up to date with demos added on main
since this branch was written:

- html/tailwind and react/tailwind BasicUsage variants for the new media
  element references (background-video, cast-button, dash-video,
  hlsjs-video, mux-audio, mux-video, native-hls-video, simple-hls-video,
  simple-hls-audio-only) and the use-media reference, mirroring their
  css variants 1:1
- wire the new variants into the reference pages behind
  <StyleCase styles={["tailwind"]}> (react demos on the media element
  pages stay source-only, matching the css variants until #1343 lands)
- sync the tooltip react tailwind demos with the Tooltip.Label change
  the css variants picked up in the meantime

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WD9APXrFDbbMEUZrR1imz3
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.

3 participants