fix(nav): the header scrolls sideways at 320 px #153
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web#153
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
The whole document scrolls horizontally at 320 CSS px, on every page. Measured in headless
Chromium at 320 x 780,
isMobile:Reproduced on
/,/en/,/docs/and/pricing/. WCAG 2.2 SC 1.4.10 (Reflow, AA) requirescontent to be presentable at 320 CSS px without scrolling in two directions.
Cause
Three things in
src/components/main-navigation.astrocompound::36flex-wrap: nowrapon.main-navigation— the two child navigations can never move ontoseparate rows, so the row cannot be narrower than the sum of their min-content widths.
:61white-space: nowrapon every link — "Gå till Bitborg" (114.7 px) cannot break.:51padding-inline: var(--page-margin)on both.main-linksand.extra-links, so the 24 pxpage margin is paid four times across one row: 96 px of a 320 px viewport, plus the 24 px
--navigation-gapat:35.163 + 160 + 24 = 347. Swedish is the worse case, and Swedish is the default language.
Fix
smallbreakpoint.padding-inlineonce, on.main-navigation, not on each child navigation.Done when
/,/en/,/docs/and/pricing/,document.documentElement.scrollWidthisnot greater than
clientWidth.aria-current="page"still marks the current page in both languages (src/lib/nav.test.tsstill passes untouched).
Part of gitborg/gitborg-docs#67.
supernaut refererade till detta ärende från bitborg/bitborg-docs2026-08-02 12:32:47 +00:00