summaryrefslogtreecommitdiff
path: root/crates/wipfel/www/style.css
diff options
context:
space:
mode:
Diffstat (limited to 'crates/wipfel/www/style.css')
-rw-r--r--crates/wipfel/www/style.css126
1 files changed, 90 insertions, 36 deletions
diff --git a/crates/wipfel/www/style.css b/crates/wipfel/www/style.css
index 3ef48b1..80c4d15 100644
--- a/crates/wipfel/www/style.css
+++ b/crates/wipfel/www/style.css
@@ -1,6 +1,56 @@
* {
box-sizing: border-box;
}
+:root {
+ /* dark is the default theme; the light block below overrides for
+ users whose OS/browser prefers light */
+ --bg: #101014;
+ --panel: #1a1a20;
+ --panel-border: #2c2c34;
+ --text: #e8e8ea;
+ --text-dim: #c8c8d0;
+ --text-faint: #8a8a94;
+ --input-bg: #24242c;
+ --input-border: #34343e;
+ --chip-bg: #2c2c34;
+ --chip-hover: #3b3b46;
+ --btn: #3b6fd4;
+ --btn-hover: #4a7ee4;
+ --accent: #7fa5e8;
+ --fitinfo: #9fd09f;
+ --canvas-bg: #101014;
+ --compass-bg: rgb(41, 41, 41);
+ --compass-fg: rgb(217, 217, 217);
+ --compass-divider: rgb(82, 82, 82);
+ --popover-bg: #1e1e26;
+ --popover-border: #3a3a46;
+ --popover-shadow: rgba(0, 0, 0, 0.5);
+}
+@media (prefers-color-scheme: light) {
+ :root {
+ --bg: #e9eaf0;
+ --panel: #ffffff;
+ --panel-border: #d6d8de;
+ --text: #1e1e26;
+ --text-dim: #44464e;
+ --text-faint: #7c7e88;
+ --input-bg: #f0f1f5;
+ --input-border: #c9ccd4;
+ --chip-bg: #e2e3e9;
+ --chip-hover: #d0d2da;
+ --btn: #3b6fd4;
+ --btn-hover: #2f5fbd;
+ --accent: #2b5cb8;
+ --fitinfo: #2e7d32;
+ --canvas-bg: #d9dbe2;
+ --compass-bg: rgb(240, 241, 245);
+ --compass-fg: rgb(40, 40, 48);
+ --compass-divider: rgb(170, 173, 182);
+ --popover-bg: #ffffff;
+ --popover-border: #c9ccd4;
+ --popover-shadow: rgba(40, 40, 60, 0.25);
+ }
+}
html,
body {
margin: 0;
@@ -14,14 +64,14 @@ body {
area behind the collapsing URL bar, pushing the compass below the
fold; dvh tracks the actually visible area */
height: 100dvh;
- background: #101014;
- color: #e8e8ea;
+ background: var(--bg);
+ color: var(--text);
}
.sidebar {
width: 300px;
padding: 16px;
- background: #1a1a20;
- border-right: 1px solid #2c2c34;
+ background: var(--panel);
+ border-right: 1px solid var(--panel-border);
display: flex;
flex-direction: column;
gap: 8px;
@@ -38,12 +88,13 @@ body {
width: 28px;
height: 28px;
padding: 0;
- background: #2c2c34;
+ background: var(--chip-bg);
+ color: var(--text);
font-size: 12px;
border-radius: 5px;
}
.sidebar .collapse-btn:hover {
- background: #3b3b46;
+ background: var(--chip-hover);
}
.nav-toggle {
position: absolute;
@@ -63,6 +114,7 @@ body {
.nav-toggle:hover {
background: rgba(59, 111, 212, 0.9);
}
+/* sits on top of the photo, so it stays dark in both themes */
.canvasstatus {
position: absolute;
bottom: 6px;
@@ -89,19 +141,19 @@ body {
.tag {
display: block;
margin: 0 0 12px;
- color: #8a8a94;
+ color: var(--text-faint);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 1px;
text-decoration: none;
}
.tag:hover {
- color: #7fa5e8;
+ color: var(--accent);
text-decoration: underline;
}
.sidebar button {
padding: 8px 12px;
- background: #3b6fd4;
+ background: var(--btn);
color: #fff;
border: 0;
border-radius: 6px;
@@ -109,16 +161,16 @@ body {
cursor: pointer;
}
.sidebar button:hover {
- background: #4a7ee4;
+ background: var(--btn-hover);
}
.status {
font-size: 13px;
- color: #c8c8d0;
+ color: var(--text-dim);
word-break: break-word;
}
.hint {
font-size: 12px;
- color: #8a8a94;
+ color: var(--text-faint);
}
.row {
display: flex;
@@ -129,13 +181,13 @@ body {
}
.fitinfo {
font-size: 12px;
- color: #9fd09f;
+ color: var(--fitinfo);
font-variant-numeric: tabular-nums;
}
.hover {
font-size: 14px;
font-weight: 600;
- color: #ffffff;
+ color: var(--text);
}
.dim {
opacity: 0.6;
@@ -143,7 +195,6 @@ body {
.hidden-file {
display: none;
}
-/* pin the optional track section to the bottom of the control pane */
.infofoot {
/* pins the info texts to the bottom of the sidebar */
margin-top: auto;
@@ -158,6 +209,7 @@ body {
flex: 1;
position: relative;
min-height: 0;
+ background: var(--canvas-bg);
}
canvas.viewport {
position: absolute;
@@ -179,8 +231,8 @@ canvas.compass {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 1px;
- color: #8a8a94;
- border-bottom: 1px solid #2c2c34;
+ color: var(--text-faint);
+ border-bottom: 1px solid var(--panel-border);
padding-bottom: 3px;
}
.slider {
@@ -193,10 +245,11 @@ canvas.compass {
display: flex;
justify-content: space-between;
font-size: 12px;
- color: #c8c8d0;
+ color: var(--text-dim);
}
.slider input[type="range"] {
width: 100%;
+ accent-color: var(--btn);
}
.numrow {
display: flex;
@@ -209,9 +262,9 @@ canvas.compass {
.numrow input {
width: 130px;
padding: 4px 6px;
- background: #24242c;
- color: #e8e8ea;
- border: 1px solid #34343e;
+ background: var(--input-bg);
+ color: var(--text);
+ border: 1px solid var(--input-border);
border-radius: 4px;
}
.numrow input[type="text"] {
@@ -226,24 +279,24 @@ canvas.compass {
position: absolute;
z-index: 10;
width: 280px;
- background: #1e1e26;
- border: 1px solid #3a3a46;
+ background: var(--popover-bg);
+ border: 1px solid var(--popover-border);
border-radius: 6px;
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 8px 24px var(--popover-shadow);
display: flex;
flex-direction: column;
}
.fpsearch {
padding: 8px;
- border-bottom: 1px solid #2c2c34;
+ border-bottom: 1px solid var(--panel-border);
}
.fpsearch input {
width: 100%;
padding: 5px 8px;
- background: #24242c;
- border: 1px solid #3a3a46;
+ background: var(--input-bg);
+ border: 1px solid var(--popover-border);
border-radius: 4px;
- color: #e8e8ea;
+ color: var(--text);
font-size: 13px;
}
.fplist {
@@ -253,18 +306,18 @@ canvas.compass {
.fpempty {
padding: 8px 10px;
font-size: 13px;
- color: #8a8a94;
+ color: var(--text-faint);
margin: 0;
}
.fpfoot {
padding: 6px 8px;
- border-top: 1px solid #2c2c34;
+ border-top: 1px solid var(--panel-border);
text-align: right;
}
.fpcancel {
padding: 4px 12px;
- background: #34343e;
- color: #e8e8ea;
+ background: var(--chip-bg);
+ color: var(--text);
border: 0;
border-radius: 4px;
font-size: 12px;
@@ -275,8 +328,8 @@ canvas.compass {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 1px;
- color: #8a8a94;
- border-bottom: 1px solid #2c2c34;
+ color: var(--text-faint);
+ border-bottom: 1px solid var(--panel-border);
}
.fpitem {
display: block;
@@ -285,10 +338,11 @@ canvas.compass {
padding: 6px 10px;
background: none;
border: 0;
- color: #e8e8ea;
+ color: var(--text);
font-size: 13px;
cursor: pointer;
}
.fpitem:hover {
- background: #2f6fd4;
+ background: var(--btn);
+ color: #fff;
}