Skip to content

Fix dark mode search text contrast#5791

Closed
Ady0333 wants to merge 1 commit intosugarlabs:masterfrom
Ady0333:fix/dark-mode-search-contrast
Closed

Fix dark mode search text contrast#5791
Ady0333 wants to merge 1 commit intosugarlabs:masterfrom
Ady0333:fix/dark-mode-search-contrast

Conversation

@Ady0333
Copy link
Contributor

@Ady0333 Ady0333 commented Feb 18, 2026

Summary

This PR fixes a low-contrast issue in the search dropdown when using dark mode. The block labels inside the autocomplete list were rendered in dark gray text on a dark background, making them difficult to read.

What was happening

The search dropdown renders block labels inside tags. The jQuery UI base theme applies:

.ui-widget-content a { color: #333333; }

This overrides the inherited white text color in dark mode, resulting in dark gray text on a dark background.


What changed

Added a dark-mode specific override in css/themes.css:

body.dark .ui-autocomplete a {
color: #fff !important;
}

This increases selector specificity and restores proper contrast in dark mode without affecting light mode.


Scope

  • Affects only the search autocomplete dropdown in dark mode
  • No changes to logic or behavior
  • No impact on light theme

Verification

  • Enabled dark mode
  • Searched for blocks (e.g., "note")
  • Confirmed dropdown text is clearly readable
  • Verified light mode remains unchanged

Before

image

After

image image

Signed-off-by: Ady0333 <adityashinde1525@gmail.com>
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@zealot-zew
Copy link
Contributor

i believe there's an open PR on this exact issue, (#5681) Please consider closing your PR to keep the reviewing easy.

@Ady0333
Copy link
Contributor Author

Ady0333 commented Feb 18, 2026

i believe there's an open PR on this exact issue, (#5681) Please consider closing your PR to keep the reviewing easy.

Well okay!! I'll close my PR.

@Ady0333 Ady0333 closed this Feb 18, 2026
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