The splash nobody could see, the white flash, and cards that let the aura through
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s

Three things, and the first two were bugs rather than taste.

**The launch screen never appeared.** Its condition was `!ready && !authed`, and `authed` is
true from the saved profile — so a signed-in person (everybody who has ever opened the app)
went straight past it and only a brand-new device ever saw the photo. It now shows for the
first half second on every launch, and beyond that only while there is genuinely nothing to
show yet (no profile and boot still running, the original behaviour, which stops the login
screen flashing before the server config lands). Deliberately not "until ready": boot pulls
from the server, and waiting for it would hide the local copy exactly when the network is
bad — working from that copy is what the offline mode is for.

**The white screen.** Until the app's stylesheet arrives the browser paints its own default,
and the aura's dark base only existed in that stylesheet — so a cold load, or a service
worker swapping in a new bundle, started white. index.html now carries the base colour
inline, and, next to it, a few lines that apply the saved theme and accent before the first
paint: the app reads those after boot, which meant everybody who had chosen anything saw the
defaults flash first. Same storage key the store writes, same resolution of 'system'.

**The cards.** They were solid --surface, which sat on top of the aura and hid it. Salud's
tiles and chart panels are glass now — the family tint over a translucent fill, a hairline
border in the same tint, and a 16px blur with a saturation lift so what shows through stays
readable. The fill is a warm near-black rather than the neutral grey: a cool card over a warm
gradient reads as a dirty edge. The token (`--glass`) is defined per theme, and where
backdrop-filter is unsupported the cards go back to solid, which is the trade the tab bar
already documents — the fallback block sits AFTER the glass rules, or the cascade would have
handed it the blur it cannot render.

Only Salud's cards are glass so far; the rest of the app is still opaque, which is a bigger
decision than this change should make on its own.
This commit is contained in:
dsantillan committed 2026-09-23 11:37:17 -04:00
1 parent c3c1c2836c
commit a0f1f388bc
3 files changed
+56 -4

No files matched your search

+17 -3
View File
@@ -24,6 +24,9 @@
--surface: #1c1c1e; /* card / grouped-list fill */
--surface-2: #2c2c2e; /* pressed + nested fill */
--surface-3: #3a3a3c; /* controls (segmented track, switch off) */
/* The translucent card fill. Deliberately a warm near-black rather than the neutral --surface:
these cards sit on the aura, and a cool grey over a warm background reads as a dirty edge. */
--glass: rgba(26,23,20,.55);
/* text */
--label: #ffffff;
@@ -67,6 +70,7 @@
--surface: #ffffff;
--surface-2: #ececef;
--surface-3: #e3e3e8;
--glass: rgba(255,255,255,.62);
--label: #000000;
--label-2: rgba(60,60,67,.60);
@@ -1327,7 +1331,9 @@ body.chips-dragging *{cursor:inherit}
behind the card. The wash is kept low (8%) on purpose — the colour is there to sort the grid at
a glance, not to shout, and a saturated tile behind a 26px number would fight the number. */
.vh-card{--tint:var(--grey);width:100%;text-align:left;display:block;font:inherit;color:inherit;padding-bottom:10px;
background:color-mix(in srgb,var(--tint) 8%,var(--surface))}
background:color-mix(in srgb,var(--tint) 10%,var(--glass));
border:var(--hair) solid color-mix(in srgb,var(--tint) 22%,transparent);
-webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%)}
.vh-card .l .icn{color:var(--tint)}
.vh-card .v{color:var(--tint)}
.vh-unit{margin-left:4px;font-size:14px;font-weight:500;color:var(--label-2);letter-spacing:0}
@@ -1350,8 +1356,16 @@ body.chips-dragging *{cursor:inherit}
the tiles, so a panel and its card are recognisably the same metric. */
.vh-charts{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.vh-tchart{--tint:var(--grey);width:100%;text-align:left;display:block;font:inherit;color:inherit;
padding:12px 10px 6px;background:color-mix(in srgb,var(--tint) 6%,var(--surface))}
.vh-tchart:active{background:color-mix(in srgb,var(--tint) 12%,var(--surface-2))}
padding:12px 10px 6px;background:color-mix(in srgb,var(--tint) 7%,var(--glass));
border:var(--hair) solid color-mix(in srgb,var(--tint) 18%,transparent);
-webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%)}
.vh-tchart:active{background:color-mix(in srgb,var(--tint) 14%,var(--glass))}
/* Same order rule as the tab bar's block: this has to come AFTER the rules above or the glass
would win here too. Without a blur, a see-through card over a busy background is worse than an
opaque one — the numbers would sit on whatever the aura happens to be doing behind them. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
.vh-card,.vh-tchart{background:color-mix(in srgb,var(--tint) 9%,var(--surface))}
}
.vh-tchart-hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 2px;margin-bottom:2px}
.vh-tchart-t{display:flex;align-items:center;gap:5px;font-size:14px;font-weight:500;color:var(--label-2)}
.vh-tchart-t .icn{font-size:15px;color:var(--tint)}