summaryrefslogtreecommitdiff
path: root/web/src/app.css
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-11-19 08:53:51 +0100
committerJoel Klinghed <the_jk@spawned.biz>2026-11-19 08:53:51 +0100
commitb884441ba0d10bdd3559748507a0991888f66194 (patch)
tree074321d353c1153e8d95191eecf5a61b2eec1096 /web/src/app.css
parentd64cf3514e5ff1ddb1c7f3ddac9a769db3e7dde0 (diff)
Phase 6: settings, saves, localization parity (M6)
Diffstat (limited to 'web/src/app.css')
-rw-r--r--web/src/app.css45
1 files changed, 42 insertions, 3 deletions
diff --git a/web/src/app.css b/web/src/app.css
index d7da597..8f3ad54 100644
--- a/web/src/app.css
+++ b/web/src/app.css
@@ -23,12 +23,17 @@
--font-display: 'PirataOne', 'Georgia', serif;
--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
- /* Layout scale (the reference app multiplies every bar dimension by the
- user's bar scaling; the web default is 1). */
+ /* Layout scale (Phase 6 scaling, the reference `scaling.dart`): the
+ scaling variables are set on <html> from the client settings
+ (`App.svelte`); the defaults below are the no-server fallback. */
+ --list-scale: 1;
+ --bar-scale: 1;
--bar-h: 40px;
--row-character-h: 60px;
--row-monster-h: 96px;
- --list-w: 400px;
+ /* 400px baseline, capped at the viewport (the reference baseline is
+ 740px on full-screen mobile). */
+ --list-w: min(100vw, calc(400px * var(--list-scale)));
/* Element colours (top_bar.dart). */
--el-fire: #e2421e;
@@ -126,6 +131,12 @@ button {
/* --- Top bar ------------------------------------------------------------ */
.topbar {
+ /* The reference `userScalingBars` constrains the bar content's width to
+ `screenWidth / userScalingBars`; the web applies the factor directly to
+ the whole bar (`zoom` scales the rendered size *and* the layout box,
+ so the app frame reflows around the bar). Browsers without `zoom`
+ simply keep the default scale. */
+ zoom: var(--bar-scale);
height: var(--bar-h);
display: flex;
align-items: stretch;
@@ -771,3 +782,31 @@ button {
select.search {
padding: 8px;
}
+
+/* --- Power mode (Phase 6) ------------------------------------------------- */
+
+/* The idle dimmer scrim (the reference `IdleDimmer`): 0.65 black, faded in
+ over 1.2 s; sits above everything so the waking tap cannot land on the
+ board. */
+.dimmer {
+ position: fixed;
+ inset: 0;
+ z-index: 300;
+ background: rgba(0, 0, 0, 0.65);
+ animation: dimmer-in 1.2s ease-out;
+}
+
+@keyframes dimmer-in {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+/* Power mode "reduce" (the reference `reducePowerEnabled`): the card
+ shadows are dropped (the reference sets the shadow blur to 0). */
+[data-power='reduce'] * {
+ box-shadow: none !important;
+}