Skip to content

Commit

Permalink
♻️ Use .dark globally for dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Dec 10, 2020
1 parent 6907e45 commit bf21f20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
6 changes: 2 additions & 4 deletions src/components/ActiveIncidents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@
background-color: #dcffeb;
color: #003300;
}
@media (prefers-color-scheme: dark) {
article {
background-color: #700000;
}
:global(.dark) article {
background-color: #700000;
}
</style>

Expand Down
6 changes: 2 additions & 4 deletions src/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
overflow-x: auto;
}
@media (prefers-color-scheme: dark) {
nav {
background-color: #002b29;
}
:global(.dark) nav {
background-color: #002b29;
}
ul {
Expand Down
14 changes: 6 additions & 8 deletions static/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,10 @@ dl dd {
margin: 0 0 1rem 0;
}

@media (prefers-color-scheme: dark) {
body {
background-color: #001716;
color: #f0ffff;
}
article {
background-color: #002b29;
}
.dark body {
background-color: #001716;
color: #f0ffff;
}
.dark article {
background-color: #002b29;
}

0 comments on commit bf21f20

Please sign in to comment.