Skip to content

Fix: theme system doesn't switch to dark #1211

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

Merged
merged 1 commit into from
Jun 29, 2025
Merged

Conversation

takuyahara
Copy link
Contributor

  • I have read the Contribution guide
  • This PR references an issue (except for typos, broken links, or other minor problems)

Description(required)

Despite setting system appearance to dark mode, selecting System theme always applies light theme because it changes html[data-theme] to sdark which is not valid for applying dark theme.

image

As done in kobaltedev/solidbase, a package which solid-docs lies on, selector should be specified in [attr*=value] style to accept both dark and sdark.

Related issues & labels

  • Closes #
  • Suggested label(s) (optional):

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jun 29, 2025

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit 6d9fdaf
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs/deploys/686099e2b4c12b000815ee37
😎 Deploy Preview https://deploy-preview-1211--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@amirhhashemi amirhhashemi left a comment

Choose a reason for hiding this comment

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

Hey! Thank you for bringing this issue to our attention.

SolidBase manages the theme selector. I believe they shouldn't use different values when the "system" theme is active. I've already created an issue and hope it gets fixed upstream. In the meantime, your PR is a good workaround.

@LadyBluenotes LadyBluenotes merged commit 4e30ce7 into solidjs:main Jun 29, 2025
7 checks passed
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.

3 participants