Skip to content

Commit 8a640cf

Browse files
committed
doc: fix color contrast for anchor marks in dark mode
Currently, in its dark mode, our website background color is #090C15 and our anchor marks are #707070 for a contrast ratio of 3.94 to 1, falling short of the WCAG AA 4.5 to 1. This changes the mark color in dark mode only to #7A7A7A for a color contrast of 4.55 to 1.
1 parent fdb097c commit 8a640cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api_assets/style.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727

2828
--color-brand-primary: var(--gray6);
2929
--color-brand-secondary: var(--green1);
30+
--color-text-nav: var(--gray3);
31+
--color-text-mark: var(--gray1);
3032
--color-text-primary: var(--gray6);
3133
--color-text-secondary: var(--green2);
3234
--color-fill-app: var(--white);
33-
--color-text-nav: var(--gray3);
3435
--highlight-background-color: var(--white-smoke);
3536
--color-links: var(--green1);
3637
--color-fill-side-nav: var(--gray6);
@@ -40,6 +41,7 @@
4041
.dark-mode {
4142
--color-links: var(--green5);
4243
--color-fill-app: var(--black1);
44+
--color-text-mark: var(--gray5);
4345
--color-text-primary: var(--white);
4446
--color-fill-side-nav: var(--black3);
4547
--highlight-background-color: var(--black2);
@@ -632,7 +634,7 @@ a code {
632634

633635
span > .mark,
634636
span > .mark:visited {
635-
color: #707070;
637+
color: var(--color-text-mark);
636638
position: absolute;
637639
top: 0;
638640
right: 0;

0 commit comments

Comments
 (0)