Repository navigation
fix: restore dark mode text color after Docusaurus 3.10 update - #302
Merged
Merged
Conversation
The Docusaurus 3.10 CSS build emits the :root variable block after the [data-theme='dark'] block. Both have equal specificity, so the light values won and text stayed dark in dark mode. Scope the dark block to :root[data-theme='dark'] so it wins regardless of order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
keerden-hw
approved these changes
Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 3d23e92): https://hw-api-documentation--pr302-fix-dark-mode-text-c-ul3mn2c7.web.app (expires Wed, 18 Nov 2026 10:22:58 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 4accc1c887f1346ec9c563d5645c74c94f610c07 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Since #300 (Node 24 / npm audit), Docusaurus went from 3.9.2 to 3.10.2. In dark mode the text is now dark, too (see https://api-documentation.homewizard.com/docs/introduction/).
The new CSS build places the
:root { … }variable block fromcustom.cssafter the[data-theme='dark'] { … }block. Both selectors have the same specificity (0,1,0), so the light values (e.g.--ifm-font-color-base: #111828) override the dark ones.Fix
Change the dark selector to
:root[data-theme='dark'](specificity 0,2,0), so the dark variables win regardless of the order in the built CSS.Verification
npm run buildsucceeds