Skip to content

fix(site): restore correct --sl-color-black in light mode for search box contrast#646

Merged
jamesadevine merged 1 commit into
mainfrom
copilot/fix-search-box-contrast
May 19, 2026
Merged

fix(site): restore correct --sl-color-black in light mode for search box contrast#646
jamesadevine merged 1 commit into
mainfrom
copilot/fix-search-box-contrast

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Summary

Starlight maps --pagefind-ui-background: var(--sl-color-black) for the search modal. In Starlight's theming system the gray scale is inverted between modes, so --sl-color-black must be #ffffff in light mode (the background endpoint). The custom CSS was setting it to #1f2328 (near-black) — same value as --sl-color-text — producing an illegible black-on-black search modal in light mode.

Fix: one-line change in site/src/styles/custom.css:

/* before */
[data-theme='light'] {
  --sl-color-black: #1f2328;  /* ← used as pagefind modal background */
  --sl-color-text:  #1f2328;
}

/* after */
[data-theme='light'] {
  --sl-color-black: #ffffff;  /* matches Starlight's expected inverted value */
  --sl-color-text:  #1f2328;
}

--sl-color-text is unchanged; body text contrast is unaffected.

Test plan

Verified locally by inspecting the compiled CSS variable resolution: --pagefind-ui-background now resolves to #ffffff in light mode, with --pagefind-ui-text resolving via --sl-color-gray-2 to hsl(224, 10%, 23%) — correct contrast.

…box contrast

Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/450f8317-4c5f-4a92-ac6d-c549d6577d12

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 19, 2026 12:17
@jamesadevine jamesadevine merged commit f63a1a6 into main May 19, 2026
@jamesadevine jamesadevine deleted the copilot/fix-search-box-contrast branch May 19, 2026 12:17
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