Skip to content

Commit 850a19a

Browse files
(generator) Updates
1 parent 823523c commit 850a19a

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

src/documentation/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ lighthighlight.forEach(rule => {
280280
for (const [keyy, valme] of Object.entries(rule.properties)) {
281281
props.push(`${keyy}:${valme}`);
282282
}
283-
CSSHIGHLIGHT += `${rule.selectors.map(s => `.${cssclass.l} ${s}`).join(',')}{${props.join(';')}}`;
283+
const outstr = (addclass) => `${rule.selectors.map(s => `.${addclass} ${s}`).join(',')}{${props.join(';')}}`;
284+
CSSHIGHLIGHT += outstr(cssclass.l);
285+
CSSHIGHLIGHT += `@media (prefers-color-scheme: light) {${outstr(cssclass.a)}}`;
284286
});
285287

286288
const charset = docsConfig ? docsConfig.charset || template.charset : template.charset;

src/documentation/templates/base.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@
4747
--wt: #ffb00080;
4848
--wb: #ffb0002b;
4949
}
50+
@media (prefers-color-scheme: light) {
51+
.a {
52+
--bg: #f0f0f0;
53+
--cl: #121212;
54+
--md: #00000026;
55+
--wt: #ffb00080;
56+
--wb: #ffb0002b;
57+
}
58+
}
5059
.stb {
5160
--sb: 0px;
5261
}
@@ -127,6 +136,12 @@ button, input {
127136
background-color: var(--md);
128137
color: var(--cl);
129138
}
139+
@media (prefers-color-scheme: light) {
140+
.a button, .a input {
141+
background-color: var(--md);
142+
color: var(--cl);
143+
}
144+
}
130145
button:hover, input:hover {
131146
opacity: 0.85;
132147
}
@@ -378,6 +393,15 @@ body.navbar-invert .navbar.scroll, .l .navbar .links a:hover {
378393
filter: hue-rotate(1deg);
379394
-webkit-filter: hue-rotate(1deg);
380395
}
396+
@media (prefers-color-scheme: light) {
397+
.a .navbar .links a#ext:after {
398+
opacity: 1;
399+
}
400+
.a .navbar .links a:hover {
401+
filter: hue-rotate(1deg);
402+
-webkit-filter: hue-rotate(1deg);
403+
}
404+
}
381405
.navbar .heading:not(:has(span)) {
382406
width: auto;
383407
height: auto;
@@ -1065,6 +1089,12 @@ input[type="checkbox"] {
10651089
background: #e5e5e5;
10661090
color: #000000;
10671091
}
1092+
@media (prefers-color-scheme: light) {
1093+
.a .code, .a .code code, .a .code * {
1094+
background: #e5e5e5;
1095+
color: #000000;
1096+
}
1097+
}
10681098

10691099
html:before, html:after, body:before, body:after {
10701100
content: none !important;

src/documentation/templates/buttons.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@
6666
.l .next button:hover {
6767
background-color: #00000020;
6868
}
69+
@media (prefers-color-scheme: light) {
70+
.a .next button:hover {
71+
background-color: #00000020;
72+
}
73+
}
6974
.next button small, .next button span {
7075
display: block !important;
7176
white-space: nowrap;

0 commit comments

Comments
 (0)