Skip to content

fix(styles/webidl): add dark mode color variants for contrast - #5286

Draft
marcoscaceres wants to merge 1 commit into
mainfrom
fix/4871-webidl-contrast
Draft

fix(styles/webidl): add dark mode color variants for contrast#5286
marcoscaceres wants to merge 1 commit into
mainfrom
fix/4871-webidl-contrast

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented May 9, 2026

Copy link
Copy Markdown
Contributor

Partially addresses #4871

Add prefers-color-scheme: dark overrides for WebIDL syntax colors
that have poor contrast on dark backgrounds.

Written with AI: this change was generated by Claude. Per AI_POLICY.md.

Add prefers-color-scheme: dark overrides for WebIDL syntax colors.
The hardcoded dark-blue (#005a9c) and orangered (#ff4500) have poor
contrast on dark backgrounds. The header badge also gets a darker
blue background with light text.

Partially addresses #4871
@marcoscaceres marcoscaceres added the AI Contains AI-generated logic; see AI_POLICY.md label Aug 5, 2026
@marcoscaceres
marcoscaceres requested a lite review from Copilot August 11, 2026 11:50

Copilot AI 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.

Pull request overview

Adds dark-mode-specific WebIDL syntax colors to improve contrast when prefers-color-scheme: dark is active, partially addressing the contrast problems described in #4871.

Changes:

  • Introduces a @media (prefers-color-scheme: dark) block for WebIDL header and token colors.
  • Adjusts link and enum item styling (text + underline/border colors) for better readability on dark backgrounds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/styles/webidl.css.js
Comment on lines +141 to +144
.idlHeader {
background: #1a5276;
color: #e8e8e8;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Contains AI-generated logic; see AI_POLICY.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants