Skip to content

Commit 7d94dd2

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

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

src/styles/app.scss

Lines changed: 56 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,58 @@ header h1 {
324324
}
325325
}
326326

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

0 commit comments

Comments
 (0)