feat: dark mode

This commit is contained in:
2020-02-07 12:57:54 +09:00
parent 9b826fde5f
commit 0f7465677c
3 changed files with 43 additions and 19 deletions

View File

@@ -6,6 +6,24 @@
$break-small: 500px;
$break-large: 840px;
:root {
--background: #fff;
--text: #000;
--accent: #4f33e8;
--highlight: #f6f6f6;
--tone: #989898;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #261e3a;
--text: #e2dfea;
--accent: #7033e8;
--highlight: #140d25;
--tone: #989898;
}
}
body {
width: 900px;
margin: 0 auto;
@@ -17,6 +35,8 @@ body {
-webkit-font-feature-settings: "kern", "palt", "pwid";
-moz-font-feature-settings: "kern", "palt", "pwid";
-moz-font-feature-settings: "kern=1", "palt", "pwid";
background: var(--background);
color: var(--text);
@media screen and (max-width: $break-large) {
width: auto;
@@ -34,6 +54,7 @@ body {
border-radius: 3px;
// font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
// font-size: 14px;
background: #0e0127 !important;
padding: 12px 18px !important;
line-height: 1.6em !important;
}
@@ -42,7 +63,7 @@ code {
}
p code {
padding: 3px 10px;
background: #f6f6f6;
background: var(--highlight);
border-radius: 3px;
font-size: 16px;
}
@@ -50,7 +71,7 @@ a:hover,
a:active,
a:link,
a:visited {
color: black;
color: var(--text);
text-decoration: none;
}
h1,
@@ -66,7 +87,7 @@ hr {
display: block;
width: 100%;
height: 1px;
background-color: #dbdbdb;
background-color: var(--highlight);
border: 0;
margin: 40px 0;
}
@@ -86,6 +107,9 @@ hr {
.logo {
margin: 10px 0 10px;
@media (prefers-color-scheme: dark) {
filter: invert(1);
}
}
.menu {