Skip to content

Commit a002257

Browse files
committed
Dark mode
1 parent bf93f00 commit a002257

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed

sphinx_prolog/_static/lpn.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
:root {
2+
color-scheme: light dark;
3+
}
4+
15
div.source {
26
position: relative;
37
margin: 10px 2ex;
4-
border: 1px solid #888;
5-
background-color: #eee;
8+
border: 1px solid light-dark(#888, #1d1d1d);
9+
background-color: light-dark(#eee, #242424);
610
padding: 4px 8px;
711
border-radius: 5px;
812
}
@@ -11,8 +15,8 @@ div.source {
1115
div.answer {
1216
position: relative;
1317
margin: 10px 2ex;
14-
border: 1px solid #888;
15-
background-color: #eee;
18+
border: 1px solid light-dark(#888, #1d1d1d);
19+
background-color: light-dark(#eee, #242424);
1620
padding: 4px 8px;
1721
border-radius: 5px;
1822
}

sphinx_prolog/_static/sphinx-prolog.css

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
/*
2+
Colours from:
3+
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html
4+
https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/_color.scss
5+
*/
6+
7+
:root {
8+
color-scheme: light dark;
9+
}
10+
111
/*Exercise directive*/
212
.admonition.exercise {
3-
border-color:#28a745;
13+
border-color: light-dark(#f66a0a, #ff9245);
414
}
515
.admonition.exercise .admonition-title {
6-
background-color: #f2fdf3;
16+
background-color: light-dark(#f8e3d0, #652a02);
717
}
8-
.admonition.exercise .admonition-title:before {
9-
color:#28a745;
18+
.admonition.exercise .admonition-title:after {
19+
color: light-dark(#f66a0a, #ff9245);
1020
content:"";
1121
}
1222
.admonition.exercise .admonition-title .solution-link {
13-
color:#ffc107;
23+
color: light-dark(#00843f, #5fb488);
1424
float: right;
15-
font-family: Font Awesome\ 5 Free;
25+
font-family: Font Awesome\ 6 Free;
1626
text-decoration: none;
1727
opacity:.3;
1828
}
@@ -23,19 +33,19 @@
2333

2434
/*Exercise solution directive*/
2535
.admonition.solution {
26-
border-color:#ffc107;
36+
border-color: light-dark(#00843f, #5fb488);
2737
}
2838
.admonition.solution .admonition-title {
29-
background-color: #fff6dd;
39+
background-color: light-dark(#d6ece1, #002f17);
3040
}
31-
.admonition.solution .admonition-title:before {
32-
color:#ffc107;
41+
.admonition.solution .admonition-title:after {
42+
color: light-dark(#00843f, #5fb488);
3343
content:"";
3444
}
3545
.admonition.solution .admonition-title .exercise-link {
36-
color:#28a745;
46+
color: light-dark(#f66a0a, #ff9245);
3747
float: right;
38-
font-family: Font Awesome\ 5 Free;
48+
font-family: Font Awesome\ 6 Free;
3949
text-decoration: none;
4050
opacity:.3;
4151
}

0 commit comments

Comments
 (0)