Bring back the big timer; the bar pill takes over on scroll
The big asleep/awake card returns below the frozen bar, and the bar pill becomes its twin: both tick together, but the pill stays visibility-hidden — slot reserved, so the bar never shifts — while the card is on screen, appearing only once the card scrolls out of sight (rAF-throttled scroll check against the bar's bottom edge).
This commit is contained in:
@@ -179,9 +179,40 @@ body::before {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.bar-clock[hidden] { display: none; }
|
||||
/* Big timer still on screen: keep the pill's slot but show nothing. */
|
||||
.bar-clock.standby { visibility: hidden; }
|
||||
.bar-clock.asleep { background: color-mix(in srgb, var(--sleep) 18%, var(--surface)); color: var(--sleep); }
|
||||
.bar-clock.awake { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
|
||||
|
||||
.big-clock {
|
||||
text-align: center;
|
||||
padding: 24px 16px;
|
||||
}
|
||||
.big-clock .bc-label {
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.big-clock .bc-time {
|
||||
font-size: 3.25rem;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.big-clock .bc-since {
|
||||
margin-top: 6px;
|
||||
font-size: 0.8rem;
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.big-clock.asleep { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--sleep) 10%, var(--surface))); }
|
||||
.big-clock.asleep .bc-time { color: var(--sleep); }
|
||||
.big-clock.awake { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent) 10%, var(--surface))); }
|
||||
.big-clock.awake .bc-time { color: var(--accent); }
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
|
||||
Reference in New Issue
Block a user