feat(compare): fill the sticky bar's label rail with a comparison caption

'COMPARING / 3 primary schools' — 0.72rem uppercase eyebrow over a
0.95rem semibold count, sized to sit alongside the 0.92rem chip names
without dominating. Desktop only; mobile pills unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
Tudor
2026-07-16 21:27:25 +01:00
co-authored by Claude Fable 5
parent 8e0b730629
commit 99b769ca9e
4 changed files with 42 additions and 3 deletions
@@ -148,10 +148,16 @@
text-overflow: ellipsis;
}
/* Caption filling the label rail on desktop ("Comparing / 3 primary
schools"). Hidden on mobile, where the bar is a row of compact pills. */
.barCaption {
display: none;
}
/* Desktop (matches the sections' 761px breakpoint): the bar adopts the same
grid template as compareSections' .grid — a 200px row-label rail plus one
column per school — so each chip sits exactly over the column it labels.
The first chip starts after the empty label rail. */
The caption occupies the rail; chips flow into the school columns. */
@media (min-width: 761px) {
.schoolBar {
display: grid;
@@ -164,8 +170,29 @@
min-width: 0;
}
.schoolChip:first-child {
grid-column: 2;
.barCaption {
grid-column: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.1rem;
padding-right: 0.5rem;
min-width: 0;
}
.barCaptionEyebrow {
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-muted, #6d685f);
}
.barCaptionCount {
font-size: 0.95rem;
font-weight: 600;
line-height: 1.3;
color: var(--text-primary, #1a1612);
}
}