Skip to content

Commit ee66491

Browse files
committed
Fix color contrast and link visual indicators for accessibility
1 parent aa8e9d5 commit ee66491

File tree

2 files changed

+118
-92
lines changed

2 files changed

+118
-92
lines changed

themes/CodeMeta-Pyramids/static/css/codemeta.css

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ body {
5858
}
5959

6060
.main{
61+
background-color: var(--bs-body-bg);
62+
}
63+
64+
[data-bs-theme=dark] .main{
6165
background-color: var(--bs-secondary-bg);
6266
}
6367

@@ -71,7 +75,7 @@ div.highlight {
7175
}
7276

7377
.highlight {
74-
background-color: var(--bs-dark-bg-subtle);
78+
background-color: var(--bs-secondary-bg);
7579
}
7680

7781
[data-bs-theme=dark] div.highlight {
@@ -80,7 +84,7 @@ div.highlight {
8084
}
8185

8286
[data-bs-theme=dark] .highlight {
83-
background-color: var(--bs-tertiary-bg) !important;
87+
background-color: var(--bs-body-bg) !important;
8488
color: var(--bs-body-color);
8589
}
8690

@@ -106,7 +110,7 @@ div.highlight {
106110
*/
107111

108112
.card {
109-
background-color: var(--bs-dark-bg-subtle);
113+
background-color: var(--bs-secondary-bg);
110114
}
111115

112116
[data-bs-theme=dark] .card {
@@ -199,3 +203,25 @@ h1,h2,h3,h4,h5,h6,h7 {
199203
border-left: 2px solid var(--bs-border-color);
200204
}
201205
}
206+
207+
/*!
208+
* Accessibility tweaks
209+
*/
210+
211+
.main a {
212+
color: var(--bs-primary);
213+
text-decoration: underline !important;
214+
text-underline-offset: 3px;
215+
}
216+
217+
[data-bs-theme=dark] .main a {
218+
color: var(--bs-primary-text-emphasis);
219+
}
220+
221+
.main a:hover {
222+
text-decoration: none !important;
223+
}
224+
225+
code{
226+
color: var(--bs-code-color);
227+
}

0 commit comments

Comments
 (0)