Clarify Docs on Applying Dark Theme Globally #6790
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
<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.