Skip to content

Commit 72dc52c

Browse files
authored
Merge pull request #766 from craftcms/a11y/code-blocks-again
Tweak colors, fix remaining issues in dark mode, add 3:1 indicator ne…
2 parents 307fb87 + 3a36c3e commit 72dc52c

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

docs/.vuepress/theme/global-components/BrowserShot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
text-align: center;
114114
margin-top: 1em;
115115
font-size: 0.9em;
116-
color: #637599;
116+
color: var(--text-color-muted);
117117
}
118118
119119
/* Points of Interest */

docs/.vuepress/theme/styles/base.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
--badge-bg-color-tip: #2F835D;
2020
--border-color: #e2e8f0;
2121
--doc-set-color: theme("colors.slate");
22-
--code-highlight-color: rgba(252, 233, 106, 0.3);
22+
--code-highlight-color: rgba(254, 246, 192, 0.5);
23+
--code-highlight-border: #938E25;
2324
--selection-color: rgba(74, 124, 246, 0.3);
2425
--code-bg-color: theme("colors.soft");
2526
--custom-block-bg-color: theme("colors.softer");

docs/.vuepress/theme/styles/code.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ div[class*="language-"] {
113113

114114
.highlighted {
115115
background-color: var(--code-highlight-color);
116+
border-left: 3px solid var(--code-highlight-border);
116117
}
117118
}
118119

@@ -127,7 +128,7 @@ div[class*="language-"] {
127128
z-index: 3;
128129
top: 0.8em;
129130
right: 1em;
130-
color: rgba(0, 0, 0, 0.25);
131+
color: var(--text-color-muted);
131132
}
132133

133134
&:not(.line-numbers-mode) {

docs/.vuepress/theme/styles/color-mode.pcss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
--code-color-green: #29A39B;
8989
--code-color-blue: #3093D9;
9090
--code-color-orange: #E96E3A;
91-
--code-color-olive: #778A00;
92-
--code-color-gray: #7C8F00;
91+
--code-color-olive: #809400;
92+
--code-color-gray: #868F9D;
93+
--code-highlight-border: #55697D;
9394

9495
.link-panel {
9596
background-color: var(--border-color);
@@ -231,7 +232,7 @@
231232

232233
div[class*="language-"] {
233234
&:before {
234-
color: rgba(255, 255, 255, 0.2);
235+
color: var(--text-color-muted);
235236
}
236237
}
237238
}

0 commit comments

Comments
 (0)