Glass everywhere, and a colour per metric rather than per family
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

Two things the Salud screen had and the rest of the app did not.

**The panels.** Every card, tile, grouped list and list row is translucent now, because the
aura is behind all of them: with a solid fill the background we added to every screen was
only visible in the gaps between cards, which is not what a background is for. The tab bar
and the sheets are translucent too, at a heavier weight — they float over content and have
to stay readable, which is what the second token (`--glass-strong`) is for. The blur comes
from one shared rule instead of each class carrying its own pair, and the per-view panels
that paint their own surface (the effort table, the superset card, the check-in card, a
note, a calendar cell) joined the list rather than being left behind.

No opaque fallback for the panels, deliberately, where the tab bar keeps one: the bar
scrolls over text, a card sits in the page flow with nothing behind it but the aura.

**The colours.** They came from the group — every Activity metric the same green, every
Heart metric the same pink — which is exactly the "all the same" that was wrong: resting
heart rate and VO₂ max are both heart, and telling them apart by colour is the whole point.
Each of the 50 metrics in the catalogue now carries its own, following the Health app's own
logic: red for heart rate and blood pressure, indigo and violet for sleep, blue for body
composition, teal for oxygen and breathing, oranges for movement and temperature. The label
takes the colour too, as asked; the group tint stays as the fallback so a metric nobody has
written a line for still gets one.

Two bugs of my own on the way, both caught by tests rather than by looking: the spec()
builder is an allow-list and was dropping the `color` it was handed, so every card fell
straight back to its family colour; and the test that now asserts "within a family the
colours are not all identical" is what would have kept that from shipping unnoticed.
This commit is contained in:
dsantillan committed 2026-09-23 11:55:54 -04:00
1 parent 9e580c4794
commit b6d3512c36
4 files changed
+118 -89

No files matched your search

+31 -18
View File
@@ -26,10 +26,12 @@
--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. */
/* 34%, not 55%: at 55 the fill was technically translucent and visually identical to opaque —
a dark film over a dark background reads as solid, and that is what people saw. This is the one
number to turn if the cards should show more or less of the aura behind them. */
--glass: rgba(20,18,16,.34);
/* Two levels of the same idea, and both were tuned by watching them rather than by taste: at 55%
a dark film over a dark background is technically translucent and visually solid, which is what
people saw. `--glass` is the panels — cards, tiles, grouped lists — and `--glass-strong` is the
things that float over content and have to be read through: the tab bar and the sheets. */
--glass: rgba(20,18,16,.38);
--glass-strong: rgba(18,16,14,.72);
/* text */
--label: #ffffff;
@@ -73,7 +75,8 @@
--surface: #ffffff;
--surface-2: #ececef;
--surface-3: #e3e3e8;
--glass: rgba(255,255,255,.44);
--glass: rgba(255,255,255,.58);
--glass-strong: rgba(255,255,255,.82);
--label: #000000;
--label-2: rgba(60,60,67,.60);
@@ -300,18 +303,27 @@ h4.sec{
/* ----------------------------------------------------------------- card -- */
.card{
background:var(--surface);border-radius:var(--r-card);
background:var(--glass);border-radius:var(--r-card);
padding:16px;margin-bottom:12px;
}
.card .big{font-size:30px;font-weight:600;letter-spacing:-.026em;line-height:1.1}
/* Every panel gets the blur from this one rule instead of each class carrying its own pair: the
backgrounds above are translucent now, and what is behind them is the aura (index.html), which is
soft enough that losing the blur costs nothing — hence no opaque fallback here, unlike the tab
bar, which floats over scrolling text and keeps one. The Salud cards declare their own because
they add a per-metric tint on top; being later in the file, theirs wins. */
.card,.tile,.sect-b,.item,.exnote,.efftbl,.ss-card,.ci-card,.cal-d{
-webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%);
}
/* ------------------------------------------------------ inset group list -- */
.sect{margin-bottom:22px}
.sect-t{
font-size:13px;font-weight:400;color:var(--label-2);
letter-spacing:-.004em;padding:0 4px 7px;display:block;
}
.sect-b{background:var(--surface);border-radius:var(--r-card);overflow:hidden}
.sect-b{background:var(--glass);border-radius:var(--r-card);overflow:hidden}
.sect-f{font-size:13px;color:var(--label-2);padding:7px 4px 0;line-height:1.38}
.lrow{
@@ -398,7 +410,7 @@ h4.sec{
/* ----------------------------------------------------------- tab bar ----- */
/* Nearly opaque, and deliberately so. At the old 72% the page read straight through the bar
and the labels had to compete with whatever was scrolling behind them — nobody needs to read
the content under a navigation bar. 94% keeps a hint of movement behind the glass without
the content under a navigation bar. --glass-strong keeps a hint of movement behind it without
letting text through. The blur is also down from 24px to 10px: this is a fixed element, so
the WebView recomposites the blurred region on every scroll frame, and on Android that is
the single most expensive thing on the screen. See @supports below for the no-blur case. */
@@ -406,11 +418,11 @@ h4.sec{
position:fixed;left:0;right:0;bottom:0;z-index:50;
display:flex;justify-content:space-around;align-items:flex-end;
padding:7px 6px calc(6px + var(--sab));
background:color-mix(in srgb,var(--bg-el) 94%,transparent);
background:var(--glass-strong);
-webkit-backdrop-filter:saturate(180%) blur(10px);backdrop-filter:saturate(180%) blur(10px);
border-top:var(--hair) solid var(--sep-op);
}
:root[data-theme="light"] #tabbar{background:rgba(249,249,251,.94)}
:root[data-theme="light"] #tabbar{background:var(--glass-strong)}
#tabbar button{
flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
color:var(--label-3);font-size:10px;font-weight:500;letter-spacing:.005em;padding-top:3px;
@@ -498,7 +510,7 @@ h4.sec{
/* ----------------------------------------------------------------- list -- */
.list{display:flex;flex-direction:column;gap:8px}
.item{
display:flex;align-items:center;gap:12px;background:var(--surface);
display:flex;align-items:center;gap:12px;background:var(--glass);
border-radius:var(--r-card);padding:10px 12px;min-height:60px;
transition:background var(--fast);text-align:left;width:100%;
}
@@ -588,7 +600,7 @@ body.chips-dragging *{cursor:inherit}
.field:focus,.input:focus{box-shadow:inset 0 0 0 2px var(--acc)}
.field.area,textarea.input{min-height:92px;resize:vertical;line-height:1.42}
.exnote{
background:var(--surface);border-radius:var(--r);padding:13px 15px;
background:var(--glass);border-radius:var(--r);padding:13px 15px;
line-height:1.45;white-space:pre-wrap;font-size:15px;margin-bottom:10px;color:var(--label-2);
}
@@ -1138,7 +1150,7 @@ body.chips-dragging *{cursor:inherit}
touch-action:none;overscroll-behavior:none;
}
.sheet{
position:absolute;left:0;right:0;bottom:0;background:var(--bg-el);
position:absolute;left:0;right:0;bottom:0;background:var(--glass-strong);
border-radius:var(--r-xl) var(--r-xl) 0 0;
padding:8px 18px calc(20px + var(--sab));
/* A tall sheet stops short of the status bar / Dynamic Island: every cap carries the top
@@ -1178,7 +1190,7 @@ body.chips-dragging *{cursor:inherit}
tabular columns you can read straight down, and the words take whatever is left. Built out
of the same grouped-list parts as the rest of the app (surface fill, inset hairlines) rather
than a real <table>, so it inherits the card look and wraps properly on a narrow phone. */
.efftbl{background:var(--surface);border-radius:var(--r-lg);overflow:hidden;margin:14px 0 12px}
.efftbl{background:var(--glass);border-radius:var(--r-lg);overflow:hidden;margin:14px 0 12px}
.efftbl .r{display:flex;align-items:center;gap:10px;padding:10px 14px;position:relative}
.efftbl .r+.r::before{
content:'';position:absolute;left:14px;right:0;top:0;height:var(--hair);background:var(--sep);
@@ -1321,7 +1333,7 @@ body.chips-dragging *{cursor:inherit}
/* --- stat tiles --- */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.tile{background:var(--surface);border-radius:var(--r-card);padding:14px}
.tile{background:var(--glass);border-radius:var(--r-card);padding:14px}
.tile .l{
color:var(--label-2);font-size:13px;font-weight:400;letter-spacing:-.004em;
text-transform:none;display:flex;align-items:center;gap:5px;
@@ -1344,6 +1356,7 @@ body.chips-dragging *{cursor:inherit}
background:color-mix(in srgb,var(--tint) 14%,var(--glass));
border:var(--hair) solid color-mix(in srgb,var(--tint) 26%,transparent);
-webkit-backdrop-filter:blur(10px) saturate(140%);backdrop-filter:blur(10px) saturate(140%)}
.vh-card .l{color:var(--tint)}
.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}
@@ -1430,7 +1443,7 @@ body.chips-dragging *{cursor:inherit}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;margin-top:10px}
.cal-h{text-align:center;font-size:11px;color:var(--label-3);font-weight:500;text-transform:uppercase;padding:2px 0}
.cal-d{
aspect-ratio:1;border-radius:10px;background:var(--surface);
aspect-ratio:1;border-radius:10px;background:var(--glass);
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
font-weight:400;font-size:15px;color:var(--label);transition:background var(--fast);
}
@@ -1459,7 +1472,7 @@ body.chips-dragging *{cursor:inherit}
.item.in-ss{box-shadow:inset 3px 0 0 var(--acc)}
.ss-card{
border-radius:var(--r-lg);padding:14px;
background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--acc-line);
background:var(--glass);box-shadow:inset 0 0 0 1.5px var(--acc-line);
}
.workout-swipe-surface{touch-action:pan-y}
/* A superset nests a card inside the page's own gutter, so its inset is paid twice. On a
@@ -1575,7 +1588,7 @@ body.chips-dragging *{cursor:inherit}
.ci-rail::-webkit-scrollbar{display:none}
.ci-card{
scroll-snap-align:center;flex:0 0 100%;box-sizing:border-box;
background:var(--surface);border-radius:var(--r-xl);padding:22px 18px;
background:var(--glass);border-radius:var(--r-xl);padding:22px 18px;
display:flex;flex-direction:column;align-items:center;gap:14px;
transition:transform var(--fast),box-shadow var(--fast),opacity var(--fast);
}