add dark mode css

This commit is contained in:
Akbar Rahman 2022-04-12 16:30:51 +01:00
parent b0fbf0c0d4
commit 8b8ddd45dd
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -1,13 +1,26 @@
:root {
--fg-light-mode: #454545;
--bg-light-mode: #fefefe;
--fg-dark-mode: #ccc;
--bg-dark-mode: #111;
}
body { body {
font-family: monospace, sans-serif; font-family: monospace, sans-serif;
color: #454545; color: var(--fg-light-mode);
font-size: 16px; font-size: 16px;
margin: 2em auto; margin: 2em auto;
max-width: 800px; max-width: 800px;
padding: 1em; padding: 1em;
line-height: 1.4; line-height: 1.4;
overflow-wrap: break-word; overflow-wrap: break-word;
background-color: #fefefe; background-color: var(--bg-light-mode);
}
@media (prefers-color-scheme: dark) {
color: var(--fg-dark-mode);
background-color: var(--bg-dark-mode);
} }
a { color: #07a; } a { color: #07a; }