Skip to content

feat(react-ui): add scheme-pinned defaults-light.css and defaults-dar… - #1318

Closed
Jayaram-max wants to merge 1 commit into
thesysdev:mainfrom
Jayaram-max:fix/issue-736-scheme-pinned-defaults
Closed

Jayaram-max wants to merge 1 commit into
thesysdev:mainfrom
Jayaram-max:fix/issue-736-scheme-pinned-defaults

Conversation

@Jayaram-max

Copy link
Copy Markdown

…k.css

defaults.css only applies the dark tokens inside
@media (prefers-color-scheme: dark), so an app that forces a scheme with still rendered the stock light tokens on devices whose system scheme is light.

Generate two extra stylesheets from the existing token source in generate-css-utils.ts: a complete light and a complete dark token set, each in a plain unlayered :root block with no media query. Expose them as @openuidev/react-ui/defaults-light.css and defaults-dark.css.

  • cp-css / css-layer-utils: copy them to dist/styles and keep them unlayered in the layered mirror (shared UNLAYERED_DEFAULTS list)
  • check-css-artifacts: assert unlayered, :root present, no media query
  • tests for the unlayered mirror and for token parity / dark overrides
  • README: document pinning a color scheme; changeset (minor)

Closes #736

Claude-Session: https://claude.ai/code/session_01CrSmpPTChaoEqAMZ7oqn2e

What

Describe the change and why it is needed.

Changes

Test Plan

Describe how you validated this change.

  • Not applicable (explain why)
  • Verified locally

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility

…k.css

defaults.css only applies the dark tokens inside
`@media (prefers-color-scheme: dark)`, so an app that forces a scheme with
<ThemeProvider mode="dark"> still rendered the stock light tokens on devices
whose system scheme is light.

Generate two extra stylesheets from the existing token source in
generate-css-utils.ts: a complete light and a complete dark token set, each in
a plain unlayered :root block with no media query. Expose them as
`@openuidev/react-ui/defaults-light.css` and `defaults-dark.css`.

- cp-css / css-layer-utils: copy them to dist/styles and keep them unlayered in
  the layered mirror (shared UNLAYERED_DEFAULTS list)
- check-css-artifacts: assert unlayered, :root present, no media query
- tests for the unlayered mirror and for token parity / dark overrides
- README: document pinning a color scheme; changeset (minor)

Closes thesysdev#736

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CrSmpPTChaoEqAMZ7oqn2e
@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

@Jayaram2006 is attempting to deploy a commit to the thesys-devs Team on Vercel.

A member of the Team first needs to authorize it.

@Jayaram-max Jayaram-max closed this Oct 8, 2026
@Jayaram-max
Jayaram-max deleted the fix/issue-736-scheme-pinned-defaults branch October 8, 2026 00:11
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.

Dark only apps render the stock light theme on light scheme devices because there is no scheme pinned CSS export

2 participants