Skip to content

feat(ThemeSwitcher): update color-scheme in applyTheme#1394

Merged
kimanhou merged 1 commit into
canonical:mainfrom
kimanhou:fix-apply-theme
Jul 8, 2026
Merged

feat(ThemeSwitcher): update color-scheme in applyTheme#1394
kimanhou merged 1 commit into
canonical:mainfrom
kimanhou:fix-apply-theme

Conversation

@kimanhou

@kimanhou kimanhou commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Done

  • Update applyTheme to toggle the document's native color-scheme style (in addition to the body's className)

This ensures modern components utilizing the native light-dark() CSS function, like pragma, adapt instantly to theme switches.

QA

Pinging @canonical/react-library-maintainers for a review.

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Steps for QA.

Percy steps

  • No visual changes expected

Signed-off-by: Kim Anh Nguyen <4783194+kimanhou@users.noreply.github.com>

@edlerd edlerd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@kimanhou kimanhou merged commit 472b75c into canonical:main Jul 8, 2026
7 checks passed
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants