Skip to content

Commit 376312e

Browse files
committed
Add dark mode scss
1 parent 7e79423 commit 376312e

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

src/styles/app.scss

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ h3, .post h2, header h2 {
281281
h2 {
282282
font-size: 2em;
283283
}
284-
284+
285285
h3 {
286286
display: block;
287287
}
@@ -324,3 +324,60 @@ header h1 {
324324
}
325325
}
326326

327+
@media (prefers-color-scheme: dark) {
328+
:root {
329+
--body-background-color: #181a1b;
330+
--body-foreground-color: #e8e6e3;
331+
--color: #d5cbc6;
332+
--yellow: #835f00;
333+
}
334+
335+
body {
336+
background-color: var(--body-background-color);
337+
color: var(--body-foreground-color);
338+
}
339+
340+
.nav a {
341+
color: var(--color);
342+
}
343+
344+
div.brand a {
345+
color: white;
346+
}
347+
348+
div.brand img {
349+
filter: invert(0.8);
350+
}
351+
352+
.white {
353+
color: white;
354+
.highlight {
355+
background-color: var(--yellow);
356+
}
357+
}
358+
359+
.white a {
360+
color: var(--color);
361+
}
362+
363+
.white code {
364+
color: white;
365+
background-color: rgba(213, 203, 198, 0.05);
366+
border: 1px solid rgba(213, 203, 198, 0.25);
367+
}
368+
369+
.white blockquote {
370+
color: white;
371+
background-color: rgba(213, 203, 198, 0.05);
372+
border: 1px solid rgba(213, 203, 198, 0.25);
373+
border-left: 8px solid var(--color);
374+
}
375+
376+
.white a.anchor::before {
377+
color: var(--color);
378+
}
379+
380+
.publish-date-author {
381+
color: var(--color);
382+
}
383+
}

0 commit comments

Comments
 (0)