Skip to content

Commit a2ade4a

Browse files
authored
Fix #2257: Make channel ordering table visible in dark mode (#2264)
When using dark mode, use a different background color for the even rows of the channel ordering table so that the entries are visible. While we're at it, make the headings for the audio node properties table, the audio param values table, and the enumeration description table look a little better in dark mode. This is done by specifying a brighter green to make it a bit more legible.
1 parent 47a04f5 commit a2ade4a

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

index.bs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ window.addEventListener("DOMContentLoaded", function () {
9090
});
9191
</script>
9292
<style>
93+
@media (prefers-color-scheme: light) {
94+
:root {
95+
--div-info-fg-color: #178217;
96+
}
97+
}
98+
@media (prefers-color-scheme: dark) {
99+
:root {
100+
--div-info-fg-color: springgreen;
101+
}
102+
}
93103
.todo {
94104
border: 1px solid red;
95105
background-color: rgba(255, 0, 0, 0.3);
@@ -124,12 +134,20 @@ table.channels td {
124134
width:60px;
125135
text-align:center;
126136
}
137+
@media (prefers-color-scheme: light) {
127138
table.channels tr:nth-child(even) {
128139
background: #EEE;
129140
}
130141
table.channels tr:nth-child(odd) {
131142
background: #FFF;
132143
}
144+
}
145+
@media (prefers-color-scheme: dark) {
146+
table.channels tr:nth-child(even) {
147+
background: var(--assertion-border)
148+
}
149+
}
150+
133151
div.node-info {
134152
padding-left: 4em;
135153
padding-right: 4em;
@@ -150,8 +168,8 @@ div.node-info > table > tbody > tr > td {
150168
div.node-info > table > thead > tr > th {
151169
line-height: 2em;
152170
font-weight: 600;
153-
color: #178217;
154171
border-bottom: 1px solid #707070;
172+
color: var(--div-info-fg-color);
155173
}
156174
div.audioparam-info {
157175
padding-left: 4em;
@@ -173,8 +191,8 @@ div.audioparam-info > table > tbody > tr > td {
173191
div.audioparam-info > table > thead > tr > th {
174192
line-height: 2em;
175193
font-weight: 600;
176-
color: #178217;
177194
border-bottom: 1px solid #707070;
195+
color: var(--div-info-fg-color);
178196
}
179197
div.enum-description > table {
180198
border-collapse: collapse;
@@ -192,7 +210,7 @@ div.enum-description > table > tbody > tr > td {
192210
div.enum-description > table > thead > tr > th {
193211
line-height: 2em;
194212
font-weight: 600;
195-
color: #178217;
213+
color: var(--div-info-fg-color);
196214
border-bottom: 1px solid #707070;
197215
}
198216
code.nobreak {

0 commit comments

Comments
 (0)