Fix guardrail card contrast in dark mode - #11800
Conversation
Use the theme-aware surface color for the Supported Guardrails cards so their foreground and background colors remain readable in both light and dark modes. Resolves wso2#11639.
Fix guardrail card contrast in dark mode
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughSummary
WalkthroughUpdated all supported guardrail cards to use Suggested reviewers: Merge Risk: ⚪ Minimal · up to This localized documentation-only change updates the Supported Guardrails cards to use a theme-aware surface color for improved readability in dark mode; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 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 the low-contrast Supported Guardrails cards in dark mode reported in #11639.
Goals
Ensure that the card backgrounds and text remain readable in both light and dark themes.
Approach
Changed the 11 Supported Guardrails cards in
en/docs/ai-gateway/ai-guardrails/overview.mdto use the theme-aware--md-surface-fg-colorvariable instead of the light-mode-only--md-primary-fg-color--lightestvariable. This lets the cards use the appropriate surface color for each documentation theme.User stories
Documentation users can read the Supported Guardrails names and descriptions when viewing the page in dark mode.
Release note
Improved dark-mode readability for the Supported Guardrails cards.
Documentation
This PR directly updates the affected documentation page: AI Guardrails.
Training
N/A — this is a documentation styling correction only.
Certification
N/A — this documentation-only change does not affect certification exams.
Marketing
N/A — no marketing content is required for this documentation styling correction.
Automation tests
Security checks
Samples
N/A — no samples were changed.
Related PRs
N/A.
Migrations
N/A — no migration is required.
Test environment
The documentation was built locally with MkDocs in non-strict mode. The generated page was checked for the updated theme variable. Strict mode reports existing Material theme plugin configuration warnings unrelated to this change.
Learning
The fix uses the existing WSO2 documentation theme variables so the card surface adapts to the selected light or dark color scheme without introducing new CSS or dependencies.