From bc7094e48bbae71379dac30c678b165cdefdc086 Mon Sep 17 00:00:00 2001 From: Kavya Sanger Date: Tue, 17 Nov 2026 18:13:13 +0530 Subject: [PATCH] refactor(client): Share the HUD notices column CSS across screen sizes --- client/public/styles.css | 78 ++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 51 deletions(-) diff --git a/client/public/styles.css b/client/public/styles.css index 902a623..21656db 100644 --- a/client/public/styles.css +++ b/client/public/styles.css @@ -6839,52 +6839,50 @@ body.working-out #paddles { } /* Notices (status pills, junction, race and event calls, sprint/KOM countdown, splits, - milestones). Large screens: the wrapper makes no box, each keeps its own place. The - sprint/KOM countdown belongs to the race layout. */ + milestones): one centred column on every screen. The media queries below only place it. + The sprint/KOM countdown belongs to the race layout. */ .hud-notices { - display: contents; + position: absolute; + display: flex; + flex-direction: column; + align-items: center; + pointer-events: none; +} + +.hud-notices > * { + position: static; + transform: none; + max-width: 100%; + margin: 0; +} + +.hud-notices .milestone-banner.show { + animation-name: milestone-in-column; +} + +/* The status pills wrap within the column instead of running past it. */ +.hud-notices .hud-status { + flex-wrap: wrap; + justify-content: center; } .ride:not([data-layout="race"]) .marker-banner { display: none; } -/* Phones: they stack in one centred column under the top panels, between the side rails - (stepper, lane buttons), so two at once never cover each other. */ +/* Phones: the column sits under the top panels, between the side rails (stepper, lane + buttons), so two notices at once never cover each other. */ @media (max-width: 760px), (max-height: 500px) and (orientation: landscape) { .hud-notices { - position: absolute; top: calc(var(--top-stack) + var(--hud-row-gap)); left: calc(var(--gap) + 64px + var(--hud-row-gap)); right: calc(var(--gap) + 64px + var(--hud-row-gap)); - display: flex; - flex-direction: column; - align-items: center; gap: var(--hud-row-gap); - pointer-events: none; - } - - .hud-notices > * { - position: static; - transform: none; - max-width: 100%; - margin: 0; } .hud-notices .race-call { white-space: normal; } - - .hud-notices .milestone-banner.show { - animation-name: milestone-in-column; - } - - /* The status pills wrap instead of running off a narrow screen. */ - .hud-notices .hud-status { - flex-wrap: wrap; - justify-content: center; - white-space: nowrap; - } } @keyframes milestone-in-column { @@ -6997,7 +6995,7 @@ body.working-out #paddles { display: none; } -/* Tablets and desktops: the notices stack in one centred column too, under the lowest top +/* Tablets and desktops: the notices sit in the same centred column, under the lowest top panel of each layout (--top-stack), between the ticker or Nearby list on the left and the map on the right (360px each side; on narrower tablets up to the right edge). */ @media (min-width: 761px) and (min-height: 501px) { @@ -7018,26 +7016,10 @@ body.working-out #paddles { } .hud-notices { - position: absolute; top: calc(var(--top-stack) + 12px); left: 360px; right: 360px; - display: flex; - flex-direction: column; - align-items: center; gap: 10px; - pointer-events: none; - } - - .hud-notices > * { - position: static; - transform: none; - max-width: 100%; - margin: 0; - } - - .hud-notices .milestone-banner.show { - animation-name: milestone-in-column; } } @@ -7073,12 +7055,6 @@ body.working-out #paddles { } } -/* Every screen: the status pills wrap within the notices column instead of running past it. */ -.hud-notices .hud-status { - flex-wrap: wrap; - justify-content: center; -} - /* --- profile ยท goals (#99) -------------------------------------------- */ .goal-cards {