add color theme option
This commit is contained in:
41
css/nav.css
41
css/nav.css
@@ -1,15 +1,19 @@
|
||||
:root {
|
||||
--nav-bg-color: black;
|
||||
--nav-text-color: white;
|
||||
--nav-header-bg-color: #0f0;
|
||||
--nav-header-text-color: black;
|
||||
--nav-link-active-text-color: white;
|
||||
--nav-link-active-bg-color: var(--main-bg-color, #404040);
|
||||
--nav-transition-speed: 250ms;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: light) {
|
||||
:root {
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
:root, :root.dark-theme {
|
||||
--nav-bg-color: black;
|
||||
--nav-text-color: white;
|
||||
--nav-header-bg-color: #0f0;
|
||||
--nav-header-text-color: black;
|
||||
--nav-link-active-text-color: white;
|
||||
--nav-link-active-bg-color: var(--main-bg-color, #404040);
|
||||
|
||||
}
|
||||
|
||||
:root.light-theme {
|
||||
--nav-bg-color: black;
|
||||
--nav-text-color: white;
|
||||
--nav-header-bg-color: #0f0;
|
||||
@@ -19,6 +23,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: light) {
|
||||
:root, :root.light-theme {
|
||||
--nav-bg-color: black;
|
||||
--nav-text-color: white;
|
||||
--nav-header-bg-color: #0f0;
|
||||
--nav-header-text-color: black;
|
||||
--nav-link-active-text-color: black;
|
||||
--nav-link-active-bg-color: var(--main-bg-color, white);
|
||||
}
|
||||
|
||||
:root.dark-theme {
|
||||
--nav-bg-color: black;
|
||||
--nav-text-color: white;
|
||||
--nav-header-bg-color: #0f0;
|
||||
--nav-header-text-color: black;
|
||||
--nav-link-active-text-color: white;
|
||||
--nav-link-active-bg-color: var(--main-bg-color, #404040);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
|
@@ -3,16 +3,19 @@
|
||||
--positive-color: #0f0;
|
||||
--highlight-color: yellow;
|
||||
--lightbg-text-color: black;
|
||||
--main-bg-color: #404040;
|
||||
--main-text-color: white;
|
||||
--main-card-bg-color: #202020;
|
||||
--main-card-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 80%), 0 2px 10px 0 rgb(0 0 0 / 80%);
|
||||
--main-table-header-bg-color: black;
|
||||
--main-input-bg-color: #404040;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: light) {
|
||||
:root {
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
:root, :root.dark-theme {
|
||||
--main-bg-color: #404040;
|
||||
--main-text-color: white;
|
||||
--main-card-bg-color: #202020;
|
||||
--main-card-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 80%), 0 2px 10px 0 rgb(0 0 0 / 80%);
|
||||
--main-table-header-bg-color: black;
|
||||
--main-input-bg-color: #404040;
|
||||
}
|
||||
|
||||
:root.light-theme {
|
||||
--main-bg-color: white;
|
||||
--main-text-color: black;
|
||||
--main-card-bg-color: white;
|
||||
@@ -22,6 +25,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: light) {
|
||||
:root, :root.light-theme {
|
||||
--main-bg-color: white;
|
||||
--main-text-color: black;
|
||||
--main-card-bg-color: white;
|
||||
--main-card-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 20%), 0 2px 10px 0 rgb(0 0 0 / 20%);
|
||||
--main-table-header-bg-color: #808080;
|
||||
--main-input-bg-color: white;
|
||||
}
|
||||
|
||||
:root.dark-theme {
|
||||
--main-bg-color: #404040;
|
||||
--main-text-color: white;
|
||||
--main-card-bg-color: #202020;
|
||||
--main-card-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 80%), 0 2px 10px 0 rgb(0 0 0 / 80%);
|
||||
--main-table-header-bg-color: black;
|
||||
--main-input-bg-color: #404040;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -115,8 +138,7 @@ hr, * {
|
||||
|
||||
.w3-select, select {
|
||||
padding: 8px;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
appearance: none;
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E:root%7Bcolor:%23fff%7D@media (prefers-color-scheme:light)%7B:root%7Bcolor:%23000%7D%7D%3C/style%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.707 14.707a1 1 0 01-1.414 0l-5-5a1 1 0 011.414-1.414L12 12.586l4.293-4.293a1 1 0 111.414 1.414l-5 5z' fill='currentColor'/%3E%3C/svg%3E");
|
||||
|
Reference in New Issue
Block a user