Skip to content

Commit 977d4f7

Browse files
committed
ensure the demo works with both preferred schemes
1 parent a609d6f commit 977d4f7

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

dev/index.html

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,39 @@
2727
content="https://codemirror-json-schema.netlify.app/example.png"
2828
/>
2929
<style>
30+
:root {
31+
--bg-color: #282c34;
32+
}
33+
h1,
34+
h2,
35+
h3 {
36+
font-weight: 200;
37+
}
3038
body {
31-
background-color: #282c34;
32-
color: var(--fbc-light-gray);
39+
background-color: var(--fbc-light-gray);
40+
color: var(--fbc-primary-text);
3341
font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
3442
"Lucida Sans Unicode", Geneva, Verdana, sans-serif;
3543
}
44+
3645
code {
3746
background-color: #1f2329;
3847
color: var(--fbc-light-gray);
3948
padding: 0.2rem;
4049
font-family: "Lucida Console", Monaco, monospace;
4150
}
51+
52+
@media (prefers-color-scheme: dark) {
53+
body {
54+
background-color: var(--bg-color);
55+
color: var(--fbc-light-gray);
56+
}
57+
code {
58+
background-color: var(--fbc-primary-text);
59+
color: var(--fbc-light-gray);
60+
}
61+
}
62+
4263
/* cm6 styles */
4364
.cm-lintRange-error {
4465
text-decoration: underline wavy red;

0 commit comments

Comments
 (0)