Skip to content

chore(ui): add light mode to code elements - #9031

Open
avivkeller wants to merge 2 commits into
mainfrom
light-mode
Open

chore(ui): add light mode to code elements#9031
avivkeller wants to merge 2 commits into
mainfrom
light-mode

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fixes nodejs/doc-kit#940 by using github-light when light mode is selected

image

Copilot AI review requested due to automatic review settings July 28, 2026 22:44
@avivkeller
avivkeller requested a review from a team as a code owner July 28, 2026 22:44

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jul 28, 2026 10:50pm

Request Review

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation-only theming for syntax highlighting and code UI; custom Shiki theme overrides in consumers are still respected.

Overview
Adds light-mode support for docs code blocks by switching Shiki from a single Nord theme to paired github-light (default) and Nord-based dark themes, with CSS that applies --shiki-dark* token overrides when [data-theme='dark'].

Code chrome (BaseCodeBox, CodeTabs, and neutral BaseButton) now uses light surfaces and text by default, with existing dark: variants preserved. Twoslash hover popups get matching light backgrounds and a dark-theme override.

A patch changeset and a highlighter unit test assert dual-theme output (light/dark, defaultColor: 'light').

Reviewed by Cursor Bugbot for commit 31efd11. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.15%. Comparing base (c086c54) to head (31efd11).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/rehype-shiki/src/highlighter.mjs 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9031      +/-   ##
==========================================
+ Coverage   75.10%   75.15%   +0.05%     
==========================================
  Files         102      102              
  Lines        9109     9124      +15     
  Branches      372      374       +2     
==========================================
+ Hits         6841     6857      +16     
+ Misses       2264     2263       -1     
  Partials        4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI review requested due to automatic review settings July 28, 2026 22:49

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 10.65 MB
New Total First Load JS 10.70 MB
Delta 44.11 KB (+0.40%)

Changes

🔄 Modified Routes (4)
Route Old First Load JS New First Load JS Delta
/[locale] 2.54 MB 2.55 MB 📈 11.03 KB (+0.42%)
/[locale]/[...path] 2.54 MB 2.55 MB 📈 11.03 KB (+0.42%)
/[locale]/blog/[...path] 2.54 MB 2.55 MB 📈 11.03 KB (+0.42%)
/[locale]/download/archive/[version] 2.54 MB 2.55 MB 📈 11.03 KB (+0.42%)

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.

Feedback: Colour contrast used for function parameter type names is too harsh

2 participants