Freeze the day picker at the top of the page

The day bar moves above everything else and sticks while scrolling, so
switching days never requires scrolling back up. A fixed strip painted
over the safe-area inset keeps content from peeking through above the
stuck bar on notched phones in standalone mode.
This commit is contained in:
Alexander Heldt
2026-07-13 20:39:06 +00:00
parent a202f3e929
commit 0009e63d23
3 changed files with 28 additions and 10 deletions
+20 -3
View File
@@ -122,15 +122,28 @@ section {
padding: 16px;
}
.big-clock {
text-align: center;
padding: 24px 16px;
/* Paints over the notch/status-bar strip so content scrolling behind the
sticky day bar never peeks through above it. Zero-height where there is no
safe-area inset. */
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
right: 0;
height: env(safe-area-inset-top, 0px);
background: var(--bg);
z-index: 65;
}
.day-bar {
position: sticky;
top: env(safe-area-inset-top, 0px);
z-index: 60;
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
padding: 8px 10px;
}
.day-bar input[type="date"] {
@@ -146,6 +159,10 @@ section {
opacity: 0.4;
cursor: not-allowed;
}
.big-clock {
text-align: center;
padding: 24px 16px;
}
.big-clock .bc-label {
font-size: 0.8rem;
text-transform: uppercase;