Skip to content

Commit

Permalink
Fix contrast accessibility issues (w3c#223)
Browse files Browse the repository at this point in the history
* implement accessibility changes
* add white background for dark modes
  • Loading branch information
ryceg authored Sep 14, 2022
1 parent 864d350 commit 0d458d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
10 changes: 10 additions & 0 deletions mdbook/theme/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ h6:target::before {
text-decoration: none;
}


/* This will need to be updated if more dark modes are added. */
.content img .ayu {
background: var(--inline-code-color);
}

.content img .coal {
background: var(--inline-code-color);
}

table {
margin: 0 auto;
border-collapse: collapse;
Expand Down
18 changes: 9 additions & 9 deletions mdbook/theme/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
--sidebar-bg: #292c2f;
--sidebar-fg: #a1adb8;
--sidebar-non-existant: #505254;
--sidebar-active: #3473ad;
--sidebar-active: #87bcfc;
--sidebar-spacer: #393939;

--scrollbar: var(--sidebar-fg);

--icons: #43484d;
--icons: #5d656c;
--icons-hover: #b3c0cc;

--links: #2b79a2;
--links: #63a8d3;

--inline-code-color: #c5c8c6;

Expand Down Expand Up @@ -137,15 +137,15 @@
--sidebar-bg: #282d3f;
--sidebar-fg: #c8c9db;
--sidebar-non-existant: #505274;
--sidebar-active: #2b79a2;
--sidebar-active: #63a8d3;
--sidebar-spacer: #2d334f;

--scrollbar: var(--sidebar-fg);

--icons: #737480;
--icons-hover: #b7b9cc;

--links: #2b79a2;
--links: #63a8d3;

--inline-code-color: #c5c8c6;

Expand Down Expand Up @@ -185,7 +185,7 @@
--icons: #737480;
--icons-hover: #262625;

--links: #2b79a2;
--links: #63a8d3;

--inline-code-color: #6e6b5e;

Expand Down Expand Up @@ -218,15 +218,15 @@
--sidebar-bg: #292c2f;
--sidebar-fg: #a1adb8;
--sidebar-non-existant: #505254;
--sidebar-active: #3473ad;
--sidebar-active: #87bcfc;
--sidebar-spacer: #393939;

--scrollbar: var(--sidebar-fg);

--icons: #43484d;
--icons: #5d656c;
--icons-hover: #b3c0cc;

--links: #2b79a2;
--links: #63a8d3;

--inline-code-color: #c5c8c6;

Expand Down

0 comments on commit 0d458d3

Please sign in to comment.