Skip to content

Fix search AI preview text contrast in dark mode - #13877

Merged
parlough merged 3 commits into
flutter:mainfrom
lamek:fix-search-ai-preview-contrast
Sep 11, 2026
Merged

Fix search AI preview text contrast in dark mode#13877
parlough merged 3 commits into
flutter:mainfrom
lamek:fix-search-ai-preview-contrast

Conversation

@lamek

@lamek lamek commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Google Programmable Search Engine recently introduced an AI Preview (SGE)
feature. The embedded script injects styles with hardcoded dark gray text
(#4D5156) intended for light backgrounds. In dark mode, this causes the AI
preview summary text, citation snippets, and footer to have very low contrast
against the dark background.

This adds styling overrides in _search.scss for .gsc-sge-* classes
to use the theme's foreground and link color variables.

Before:
Screenshot 2026-09-10 2 58 00 PM

After:
image

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot

flutter-website-bot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit 6e4ec79):

https://flutter-docs-prod--docs-pr13877-fix-search-ai-preview-4y4vved6.web.app

@flutter-website-bot

flutter-website-bot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit 6e4ec79):

https://flutter-dev-230821--www-pr13877-fix-search-ai-preview-olkdu96l.web.app

@lamek
lamek requested a review from parlough September 10, 2026 22:06
@lamek
lamek marked this pull request as ready for review September 10, 2026 22:06
@lamek
lamek requested review from a team and sfshaza2 as code owners September 10, 2026 22:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds SCSS styles for Google Programmable Search AI Preview (SGE) elements. The feedback suggests grouping selectors with identical style declarations to keep the stylesheet DRY.

Comment thread sites/docs/lib/_sass/pages/_search.scss Outdated
@lamek
lamek force-pushed the fix-search-ai-preview-contrast branch from 923688c to 45ff410 Compare September 10, 2026 22:09

@parlough parlough left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@parlough
parlough merged commit 6a5d77c into flutter:main Sep 11, 2026
14 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.

3 participants