Skip to content

Commit a76f233

Browse files
docs: use higher contrast color tokens for code comments (#19187)
* fix: use higher contrast color tokens for code comments * Switched to var(--color-comments-color
1 parent db19502 commit a76f233

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/assets/scss/syntax-highlighter.scss

+1-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ pre[class*="language-"] {
5656
.token.prolog,
5757
.token.doctype,
5858
.token.cdata {
59-
color: #6e7f8e;
60-
61-
[data-theme="dark"] & {
62-
color: #8e9fae;
63-
}
59+
color: var(--code-comments-color);
6460
}
6561

6662
.token.namespace {

docs/src/assets/scss/tokens/themes.scss

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
--color-brand: var(--color-primary-800);
7575
--body-background-color: #fff;
7676
--body-text-color: var(--color-neutral-500);
77+
--code-comments-color: var(--color-neutral-500);
7778
--headings-color: var(--color-neutral-900);
7879

7980
--border-color: var(--color-neutral-300);
@@ -115,6 +116,7 @@
115116
:root {
116117
--body-background-color: var(--color-neutral-900);
117118
--body-text-color: var(--color-neutral-300);
119+
--code-comments-color: var(--color-neutral-400);
118120
--headings-color: #fff;
119121

120122
--divider-color: var(--color-neutral-600);
@@ -156,6 +158,7 @@
156158
html[data-theme="light"] {
157159
--body-background-color: #fff;
158160
--body-text-color: var(--color-neutral-500);
161+
--code-comments-color: var(--color-neutral-500);
159162
--headings-color: var(--color-neutral-900);
160163

161164
--border-color: var(--color-neutral-300);
@@ -198,6 +201,7 @@ html[data-theme="dark"] {
198201

199202
--body-background-color: var(--color-neutral-900);
200203
--body-text-color: var(--color-neutral-300);
204+
--code-comments-color: var(--color-neutral-400);
201205
--headings-color: #fff;
202206

203207
--divider-color: var(--color-neutral-600);

0 commit comments

Comments
 (0)