Skip to content

refactor(client): Share the HUD notices column CSS across screen sizes - #122

Open
Kavya0224 wants to merge 2 commits into
Lethonium:mainfrom
Kavya0224:refactor/share-hud-notices-css
Open

Kavya0224 wants to merge 2 commits into
Lethonium:mainfrom
Kavya0224:refactor/share-hud-notices-css

Conversation

@Kavya0224

Copy link
Copy Markdown

Closes #103

#84 stacked the HUD notices in one centred column on tablets and desktops, as
#79 did on phones, but repeated the phone block's column rules. The two media
queries together cover every screen size, so the column belongs outside them.

What changed

  • One top-level .hud-notices rule now holds the column layout (position,
    display: flex, flex-direction, align-items, pointer-events), plus the
    shared > *, .milestone-banner.show and .hud-status rules, once each.
  • The media queries only set what differs: top, left, right, gap, and
    the phone-only .race-call { white-space: normal; }.
  • Removed:
    • the top-level display: contents rule and its outdated comment
    • the late top-level .hud-status block, now part of the shared rules
    • white-space: nowrap on .hud-status in the phone block, because the base
      .hud-status rule already sets it for every screen

The later, more specific rules (landscape training and race overrides, the
broadcast and narrow-tablet left/right, and the :has() one-notice-at-a-time
rules) are unchanged and still override the shared rules as before.

No visual change is intended.

Checks

  • No selector in styles.css repeats a property that another rule for the
    same screens already sets
  • Client lint passes. 1730 of 1732 client tests pass; i18nHtml and
    i18nSweep fail on my Windows machine with and without this change
    (a C:\C:\... path error), so I'm relying on CI for them.
  • make check: I couldn't run it locally (no make or Rust on my machine),
    so I'm relying on CI.
  • Notices checked in the browser, before and after, at 375×667 and 667×375
    (phone upright and sideways) and 1440×900 and 900×1440 (desktop and
    tablet), in the layouts: .

Screenshots

localhost_8080_ (1) localhost_8080_

Before and after look the same at every size, as intended. I can add the
remaining sizes and layouts if you'd like them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share the HUD notices column CSS between phones and larger screens

1 participant