Skip to content

Commit 3e755ae

Browse files
committed
Fix dark mode
1 parent 24b4453 commit 3e755ae

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

docs/assets/extra.css

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
:root {
2+
/* ✅ Fonts */
23
--md-text-font: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted",
3-
"Segoe UI", "Liberation Sans", sans-serif !important;
4+
"Segoe UI", "Liberation Sans", sans-serif;
45
--md-code-font: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono",
56
Menlo, Consolas, monospace;
7+
8+
/* ✅ Light Mode Text Colors */
9+
--md-default-fg-color: #111;
10+
}
11+
12+
[data-md-color-scheme="slate"] {
13+
/* ✅ Dark Mode Text Colors */
14+
--md-default-fg-color: #e9e9e9;
615
}
716

817
/* Fix a horizontal scroll isue */
@@ -26,7 +35,6 @@
2635
padding: 0;
2736
padding-left: 20px;
2837
padding-right: 20px;
29-
color: black;
3038
}
3139

3240
/* Change header fonts */
@@ -38,28 +46,21 @@
3846
}
3947

4048
h1 {
49+
color: var(--md-default-fg-color);
4150
font-size: 1.2rem;
42-
margin-top: 0.3em;
4351
margin-bottom: 1em;
4452
}
4553

4654
h2 {
4755
font-size: 1rem;
48-
margin-top: 1.5em;
49-
margin-bottom: 1em;
5056
}
5157

5258
h3 {
5359
font-size: 0.9rem;
54-
margin-top: 2em;
55-
margin-bottom: 1.1em;
5660
}
5761

5862
p, ul, ol, pre {
5963
font-size: 17px;
60-
}
61-
62-
p {
6364
margin-top: 1em;
6465
margin-bottom: 1em;
6566
}
@@ -70,17 +71,24 @@
7071
}
7172

7273
blockquote {
73-
color: #666;
74-
background-color: #ffd;
7574
border-left: 0 !important;
76-
border-radius: 5px;
75+
border-radius: 0;
7776
margin: 0;
78-
padding: 1px 0 !important;
77+
margin-bottom: 1em;
78+
padding: 1px;
79+
background-color: rgba(255, 87, 34, 0.05);
80+
81+
[data-md-color-scheme="slate"] {
82+
background-color: rgba(255, 204, 0, 0.1);
83+
}
7984
}
8085

8186
pre {
8287
line-height: 150%;
8388
}
89+
pre > code {
90+
padding-left: 20px;
91+
}
8492
}
8593

8694
.md-content__inner {

0 commit comments

Comments
 (0)