move darkmode to a module

This commit is contained in:
Akbar Rahman 2022-04-12 17:01:14 +01:00
parent ddfde7ccd8
commit b5be196dd9
Signed by: alvierahman90
GPG Key ID: 20609519444A1269
2 changed files with 26 additions and 25 deletions

View File

@ -1,12 +1,8 @@
:root {
--fg-light-mode: #454545;
--bg-light-mode: #fefefe;
--fg-dark-mode: #ccc;
--bg-dark-mode: #111;
--a-light-mode: #07a;
--a-visited-light-mode: #941352;
--a-dark-mode: #07a;
--a-visited-dark-mode: #aa346d;
}
body {
@ -102,24 +98,3 @@ kbd {
margin-left: 0.2em;
margin-right: 0.2em;
}
@media (prefers-color-scheme: dark) {
body {
color: var(--fg-dark-mode);
background-color: var(--bg-dark-mode);
}
img, video {
opacity: .75;
transition: opacity .5s ease-in-out;
}
img:hover, video:hover {
opacity: 1;
}
a {
color: var(--a-dark-mode);
}
a:visited {
color: var(--a-visited-dark-mode);
}
}

26
modules/darkmode.css Normal file
View File

@ -0,0 +1,26 @@
:root {
--fg-dark-mode: #ccc;
--bg-dark-mode: #111;
--a-dark-mode: #07a;
--a-visited-dark-mode: #aa346d;
}
@media (prefers-color-scheme: dark) {
body {
color: var(--fg-dark-mode);
background-color: var(--bg-dark-mode);
}
img, video {
opacity: .75;
transition: opacity .5s ease-in-out;
}
img:hover, video:hover {
opacity: 1;
}
a {
color: var(--a-dark-mode);
}
a:visited {
color: var(--a-visited-dark-mode);
}
}