Fix guardrail card contrast in dark mode#11689
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughUpdated Supported Guardrails cards to use a theme-aware background color, improving text readability in both light and dark modes while preserving the existing card layout and links. WalkthroughThe Supported Guardrails card links now use Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
Fix insufficient text contrast in the Supported Guardrails cards when the documentation is displayed in dark mode.
The cards previously used a near-white background while inheriting the dark theme’s light foreground colors, making their titles and descriptions difficult to read.
Fixes #11639
Goals
Ensure the Supported Guardrails cards remain readable and accessible in both light and dark modes.
Approach
Updated the card background to use the existing theme-aware
--md-surface-fg-colorCSS variable. This preserves the white surface in light mode and provides a dark surface with readable light text in dark mode.User stories
Documentation users can comfortably read guardrail names and descriptions regardless of the selected color scheme.
Release note
Improved the readability of Supported Guardrails cards in dark mode.
Documentation
Updated the AI Gateway → AI Guardrails → Overview page.
Training
N/A — no training-content impact.
Certification
N/A — this documentation styling fix does not affect certification exams.
Marketing
N/A — no marketing-content impact.
Automation tests
Security checks
Samples
N/A — no sample changes.
Related PRs
N/A
Migrations
N/A — no migration is required.
Test environment
Learning
The issue was caused by using a light-only background token with theme-dependent foreground colors. The fix uses the documentation theme’s existing surface-color variable so the card background adapts automatically to the selected color scheme.