Repository navigation
react: use link colors for inline type annotations - #1245
adityareddy-dev wants to merge 2 commits into
Conversation
Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Could someone approve the workflow runs? PR Quality also can't start because the repository's Actions settings don't allow the shared workflow from webpack/.github. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1245 +/- ##
=======================================
Coverage 94.14% 94.14%
=======================================
Files 291 291
Lines 28908 28908
Branches 2936 2936
=======================================
Hits 27214 27214
Misses 1672 1672
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| File | Main | PR | Change |
|---|---|---|---|
assets/style-DOjyqch-.css |
— | 138.37 KB | +138.37 KB |
assets/style-oesv8pX0.css |
138.33 KB | — | -138.33 KB (-100.0%) |
Performance estimate (single CI run)
- Generation time: 17.6% slower (15.20 s → 17.88 s)
- Peak memory: 2.9% lower (1.53 GB → 1.48 GB)
kgeminicdev
left a comment
There was a problem hiding this comment.
Checked why the !important is needed. In light mode the token color is Shiki's inline style="color:…", and in dark mode rehype-shiki forces it with [data-theme='dark'] span[style*='--shiki-dark'] { color: var(--shiki-dark) !important }. So nothing short of !important gets the link color through. main code.type .type-link span (0,2,3) outranks rehype-shiki's (0,2,1), so dark mode works too, and since the color comes from ui-components' a rule, the hover color now applies as well.
Nit: since this replaces a comment that explained the choice, it'd be worth saying why the !important is there, e.g. /* Beat Shiki's inline light color and rehype-shiki's !important dark one */.
Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com>
|
Fixed. |
Description
I made linked type annotations use the link color in both themes, so
WeakSetandPromisehave the same style.Validation
The browser check compares the link and span colors in light and dark themes.
Light theme:
Dark theme:
Related Issues
Fixes #1054
Check List
node --run testand all tests passed.node --run format:check&node --run lint.