Skip to content

Commit 41920cb

Browse files
react: use link colors for inline type annotations (#1245)
* react: use link colors for inline type annotations Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com> * react: explain inline type color override Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com> * react: remove type link CSS e2e test Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com> --------- Signed-off-by: Aditya Reddy <82123567+adityareddy-dev@users.noreply.github.com>
1 parent 1655cb5 commit 41920cb

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎.changeset/blue-type-links.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@doc-kit/generator-react': patch
3+
---
4+
5+
Use a consistent link color for inline type annotations in light and dark themes.

‎packages/react/src/html/ui/index.css‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,13 @@ main {
214214
border-radius: calc(var(--spacing, 0.25rem) * 1);
215215

216216
.type-link {
217-
/* Links keep their token color; underline marks the affordance */
218-
color: inherit;
219217
text-decoration: underline dotted;
220218

219+
span {
220+
/* Override Shiki's inline light color and rehype-shiki's !important dark color. */
221+
color: inherit !important;
222+
}
223+
221224
&:hover {
222225
text-decoration: underline;
223226
}

0 commit comments

Comments
 (0)