-
Notifications
You must be signed in to change notification settings - Fork 19
chore(styles): disable automatic dark scheme #6173
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 59ae3f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Related Previews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really want to keep the changes in the styles playground?
Imo, they where only there for testing reasons, but we should revert them now.
Instead we should remove the data-color-scheme="light"
attribute on the html
tag in the docs (see preview-body.html). Because this was the "old" way to ensure, the docs always were renderd in light mode and would need to be removed as soon as the dark mode is ready anyway.
I intentionally put the changes in the styles playground so that we can test components when they don't have a Also, removing the data-color-scheme on the preview-body breaks all of the tests of the palette as it's needed to test the palettes on the different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Chrome 122 (which should use the fallback)
with perfers-color-scheme: dark
and absolutely no data-color-scheme
attribute anywhere,
it still uses the dark tokens.

It seems to come from the color-scheme.set()
mixin, which is still setting color-scheme
and --post-fallback-perfers-light
to whatever is sent along as a parameter (e.g. $scheme-token
) and is used in the palettes, post-banner and card component. .
So the solution should be to hardcode the two values there as well, similar to how we do it in the schemes-static.scss
.

|
📄 Description
Temporarily disabled the automatic dark scheme based on the user's preferred color scheme.