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

Clarify Docs on Applying Dark Theme Globally #6790

Open
wants to merge 6 commits into
base: docs
Choose a base branch
from

Conversation

abhishek-junghare
Copy link

Setting the dark theme globally can be confusing, or at least, it was for me. When enabling dark mode, users typically expect it to apply globally, but this isn’t the case by default. I spent over an hour troubleshooting before finally discovering the relevant information in the Sync style of the body element section. However, this section is at the bottom of the documentation and isn't titled clearly, making it easy to miss.

I propose two possible solutions:

  1. Rewrite and reposition the Sync style of the body element section. The new title could be something more direct, like "Apply Theme Globally", and the section should clearly explain that adding this step ensures global theme application. Moving it immediately after the Use dark theme section would make it more visible to users configuring dark mode.
  2. Add a brief note about <n-global-style> right after the Use dark theme section to ensure users immediately understand what’s required.

This PR implements the second solution. If a more detailed rewrite is preferred, that might be a better long-term fix. This small change should help prevent confusion and improve the developer experience.

Copy link

vercel bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 10:19pm

@jahnli
Copy link
Collaborator

jahnli commented Mar 6, 2025

image

There seems to be a problem, containing redundant commits

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