Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Ensure createV9Theme uses appropriate base theme for dark theme #31743

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miroslavstastny
Copy link
Member

Previous Behavior

The createV9Theme function did not fully support some tokens in the dark theme. Specifically, there was no mapping for status tokens between V8 and V9. As a result, even in the dark theme, the token values were derived from webLightTheme, leading to incorrect colors in the dark theme.

New Behavior

The createV9Theme function now correctly detects if the provided V8 theme is a dark theme and uses webDarkTheme as the base theme instead of webLightTheme. This ensures that the tokens are correctly mapped and rendered for the dark theme.

🚨 With the fix, createV9Theme now depends on both webLightTheme and webDarkTheme and adds both to a bundle. We need to decide whether that is worth it.

Related Issue(s)

@miroslavstastny miroslavstastny requested review from GeoffCoxMSFT and a team as code owners June 17, 2024 23:50
@github-actions github-actions bot added this to the April Project Cycle Q1 2024 milestone Jun 17, 2024
@fabricteam
Copy link
Collaborator

📊 Bundle size report

✅ No changes found

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.

[Bug]: CreateV9Theme cannot support some token in dark theme
3 participants