fix: improve light theme code block variable contrast - #2373
Conversation
|
@Ibochkarev is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 58 minutes Limit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a local Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
themes/material-theme-lighter-contrast.mjs (1)
12-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for comment and docstring preservation.
Test default, variable, comment, and docstring token scopes. This protects the contrast rule from changing comment colors in future theme updates.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@themes/material-theme-lighter-contrast.mjs` around lines 12 - 26, Add regression tests for patchTokenColors covering default, variable, comment, and docstring token scopes. Verify that the contrast transformation preserves comment and docstring colors while applying the expected foreground adjustment only to eligible non-comment tokens.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@themes/material-theme-lighter-contrast.mjs`:
- Around line 12-26: Add regression tests for patchTokenColors covering default,
variable, comment, and docstring token scopes. Verify that the contrast
transformation preserves comment and docstring colors while applying the
expected foreground adjustment only to eligible non-comment tokens.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 685db608-184c-4be9-bd5c-cd6819fe31a1
📒 Files selected for processing (3)
helpers/mdc-parser.mjsnuxt.config.tsthemes/material-theme-lighter-contrast.mjs
Production bundleComparing
Largest module increases
|
|
@benjamincanac would love to have your POV on it |
🔗 Linked issue
Fixes #2217
📚 Description
On the light theme, Material Theme Lighter paints variables and comments the same gray (
#90A4AE), so names likedataandsignallook muted on docs pages.I added a small patched theme that keeps comments muted and darkens other
#90A4AEtokens (plus default foreground) to#455A64, then wired it in for content highlighting and the MDC parser. Dark theme staysmaterial-theme-palenight.