From b41ce8b522c76461ddb06f3b9f4df97f84c5f0eb Mon Sep 17 00:00:00 2001 From: joao <22820692+joaolago1113@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:36:42 +0000 Subject: [PATCH] chore: Fix Search Input Visibility in Dark Mode (#4317) ### Summary This pull request addresses an issue with the search input box on the Noir documentation site when in dark mode. The text within the search box is illegible due to the white background color, which conflicts with the white text color. ### Problem Description In dark mode, the background color of the search input box remains white, while the text color is also white, rendering the text invisible to users. This creates a poor user experience as it prevents users from seeing what they are typing into the search box. ### Solution To fix this issue, the background color of the search input box has been changed to transparent, allowing for the text to be visible in both light and dark modes. ### Visual Evidence of Issue #### Desktop Dark Mode | Input State | Screenshot | |-------------|------------| | Text Entered, Barely Visible |
| #### Mobile Dark Mode | Input State | Screenshot | |-------------|------------| | Text Entered, Barely Visible | | ### Visual Comparison | Mode | Before Change | After Change | |----------|---------------|--------------| | Dark - Desktop | | | | Light - Desktop | | | | Dark - Mobile | | | | Light - Mobile | | | ### Files Changed - `docs/src/css/custom.css`: Added styles to override the default background color of the `#docsearch-input` element. ### Testing The changes have been tested across various browsers and devices to ensure compatibility and that the search input box text is now clearly visible in both light and dark modes. --- docs/src/css/custom.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 5a526ec5bfd..b08766fbc3b 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -209,3 +209,8 @@ html[data-theme='dark'] { border-width: 0; border-style: solid; } + +input#docsearch-input { + background-color: transparent; +} +