fix(search): align DocSearch v4 modal colors with the Playwright brand#2047
Merged
Merged
Conversation
DocSearch v4 moved its accent onto new CSS variables (--docsearch-highlight-color and friends) that Docusaurus's theme-search-algolia does not map to Infima, so on a brand-colored site they fall back to Algolia blue/indigo and dark-mode surfaces render navy. Override the unmapped variables in custom.css to use the Playwright green accent and neutral surfaces in both themes. Also neutralize the "no results" icon, whose inline SVG hardcodes stroke="#5a5e9a" and therefore ignores the DocSearch variable palette. The Algolia logo is intentionally left blue: its SVG uses hardcoded fills and the free tier requires the mark to stay unmodified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dgozman
approved these changes
Jun 5, 2026
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.
Summary
After the Docusaurus migration bumped Algolia DocSearch from v3 to v4, the search modal stopped picking up our brand color. DocSearch v4 moved its accent onto new CSS variables (
--docsearch-highlight-colorand friends) that Docusaurus'stheme-search-algoliadoesn't map to Infima — so on our green-branded site they fall back to Algolia blue/indigo, and dark mode renders navy surfaces.This overrides the unmapped DocSearch v4 variables in
custom.cssso the search modal uses the Playwright green accent and neutral surfaces in both light and dark themes. Per DocSearch's styling docs, overriding these variables is the intended customization path for brand-colored sites.What changed
#242526/#1b1b1d).stroke="#5a5e9a"and ignores the variable palette, so it's neutralized with an explicit CSS rule.Before / After
Light mode
Dark mode
"No results" icon
Notes
src/css/custom.css; no config or dependency changes.--docsearch-*values in both themes on the running dev server.