Skip to content

fix(playground): apply the dark palette to demos in dark mode - #4905

Draft
thetaPC wants to merge 1 commit into
mainfrom
demo-dark-palette
Draft

thetaPC wants to merge 1 commit into
mainfrom
demo-dark-palette

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Demos stopped following the site's dark mode when Ionic renamed ion-theme-dark to ion-palette-dark. Updating the class alone leaves them half dark, because common.js loaded the palette before ionic.bundle.css and the bundle's default colors won.

  • common.js toggles ion-palette-dark and loads the palette right after ionic.bundle.css, the order an app uses. Demos that load their own palette, like the theming demos, are skipped.
  • The datetime global theming and preference-based animation demos target .ion-palette-dark instead of body.dark, which nothing sets.

Visible change: demos now go dark with the site, and the Dark Mode page's class demos switch palette along with their toggle.

How to test

Switch the preview to dark mode:

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Nov 26, 2026 3:58am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 9b310f1e Deployed Nov 26, 2026 by vercel[bot]
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