Skip to content

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

Merged
thetaPC merged 4 commits into
mainfrom
demo-dark-palette
Dec 2, 2026
Merged

thetaPC merged 4 commits 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 Dec 2, 2026 10:28pm UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review December 1, 2026 23:28
@thetaPC
thetaPC requested a review from a team as a code owner December 1, 2026 23:28
@thetaPC
thetaPC requested a review from brandyscarney December 1, 2026 23:28

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, thank you!

Comment thread static/usage/v8/common.js Resolved
…bundle link

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
@thetaPC
thetaPC merged commit 90dc6d3 into main Dec 2, 2026
7 checks passed
@thetaPC
thetaPC deleted the demo-dark-palette branch December 2, 2026 22:32

This branch was successfully deployed

1 active deployment
Preview — 5707bb6a Deployed Dec 2, 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.

2 participants