Top bar: scale a wide custom logo down on a phone instead of cutting it off #125

Merged
jcoffey-dev merged 1 commits from fix/124-topbar-logo-phone into main 2026-11-19 18:02:23 +00:00
Owner

Fixes #124.

A wide custom logo in the top bar was cut off on a phone: the image would not shrink below its own width, so the search field painted over the rest of it ("ARCVA" in portrait).

At phone widths (768px and below) img.server-logo now gets min-width: 0, max-width: 30vw and object-position: left center. The logo scales down whole (object-fit: contain was already set). A square logo is under the cap and does not change. Desktop is unchanged.

Checked locally: typecheck, npm test (193 files, 1621 tests, including a new test that pins the phone rule), release-version.test.sh, build, i18n:check. Screenshots in headless Chromium of the top bar with the real stylesheet at 320, 375, 440 and 900px, with a wide and a square logo. Not tried on a real iPhone.

Fixes #124. A wide custom logo in the top bar was cut off on a phone: the image would not shrink below its own width, so the search field painted over the rest of it ("ARCVA" in portrait). At phone widths (768px and below) `img.server-logo` now gets `min-width: 0`, `max-width: 30vw` and `object-position: left center`. The logo scales down whole (`object-fit: contain` was already set). A square logo is under the cap and does not change. Desktop is unchanged. **Checked locally:** typecheck, `npm test` (193 files, 1621 tests, including a new test that pins the phone rule), `release-version.test.sh`, build, `i18n:check`. Screenshots in headless Chromium of the top bar with the real stylesheet at 320, 375, 440 and 900px, with a wide and a square logo. Not tried on a real iPhone.
jcoffey-dev added this to the 27.1 milestone 2026-11-19 17:59:43 +00:00
jcoffey-dev added the bug
priority
p3
labels 2026-11-19 17:59:43 +00:00
jcoffey-dev self-assigned this 2026-11-19 17:59:43 +00:00
jcoffey-dev added 1 commit 2026-11-19 17:59:43 +00:00
Top bar: scale a wide custom logo down on a phone instead of cutting it off
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m2s
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / announce (pull_request) Skipped
42fa17f97b
The custom logo in the top bar is 34px high and up to 180px wide. A wide
wordmark asked for the full 180px, the image wouldn't shrink below its
own width (a flex item's min-width), and on a phone the search field
painted over the rest of it: "ARCVA" on an iPhone in portrait (#124).

At phone widths the logo now has min-width 0, a 30vw cap and
object-position left, so it scales down whole (object-fit: contain was
already set). A square logo is under the cap and doesn't change; desktop
is unchanged. Checked in Chromium at 320, 375, 440 and 900px with a wide
and a square logo. Test: the phone rule, pinned.

Fixes #124
jcoffey-dev merged commit d62a7425e9 into main 2026-11-19 18:02:23 +00:00
Sign in to join this conversation.