Skip to content

docs: improve icon search visibility in dark mode - #5158

Merged
Doberjohn merged 2 commits into
callstack:mainfrom
mensonones:fix/docs-icons-search-dark-mode
Nov 3, 2026
Merged

Doberjohn merged 2 commits into
callstack:mainfrom
mensonones:fix/docs-icons-search-dark-mode

Conversation

@mensonones

@mensonones mensonones commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

The docs Icons page search input is unreadable in dark mode (white text on #f0f0f0). Adds dark styles for the Rspress html.dark class. Supersedes #4823.

Related issue

Fixes #4822

Screenshots / Videos

Before:
before

After (default / focus):
after-normal
after-focus

Test plan

yarn docs dev, open /react-native-paper/docs/guides/icons, switch to dark theme and check the search input in default, hover and focus states. Light theme should look unchanged.

@Doberjohn Doberjohn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @mensonones, this is exactly the fix. The html.dark selector and the --rp-c-* variables are right for the Rspress docs, and the text color fix keeps light mode unchanged. Approving.

One optional nit, the hover and focus background could be var(--rp-c-bg-mute, #38373d) instead of the bare hex, like the other rules in the file.

@mensonones

Copy link
Copy Markdown
Contributor Author

Thanks @mensonones, this is exactly the fix. The html.dark selector and the --rp-c-* variables are right for the Rspress docs, and the text color fix keeps light mode unchanged. Approving.

One optional nit, the hover and focus background could be var(--rp-c-bg-mute, #38373d) instead of the bare hex, like the other rules in the file.

Thanks for the review! I tried --rp-c-bg-mute for the hover/focus state first, but in dark mode it resolves to #838289, which is too light: the placeholder text becomes hard to read. That's why the hex is used there. Happy to switch it if you prefer another token closer to --rp-c-bg-soft.

@Doberjohn

Doberjohn commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @mensonones, this is exactly the fix. The html.dark selector and the --rp-c-* variables are right for the Rspress docs, and the text color fix keeps light mode unchanged. Approving.
One optional nit, the hover and focus background could be var(--rp-c-bg-mute, #38373d) instead of the bare hex, like the other rules in the file.

Thanks for the review! I tried --rp-c-bg-mute for the hover/focus state first, but in dark mode it resolves to #838289, which is too light: the placeholder text becomes hard to read. That's why the hex is used there. Happy to switch it if you prefer another token closer to --rp-c-bg-soft.

Thanks for checking. That makes sense, keep the hex. Merging as is. Thanks for contributing to Paper!

@Doberjohn
Doberjohn merged commit aa87eb7 into callstack:main Nov 3, 2026
11 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.

Docs: Icon search in dark theme

2 participants