162 refine the header and theme switch at narrow widths #183
+106
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refine the header and theme switch at narrow widths
Closes #162
Why
On narrow screens "Report a sighting" wrapped under the logo, and the theme switch floated between the two rows, lined up with neither. At 481–488 px the full-size logo made the row too wide, so the header wrapped into that same misaligned layout.
What changed
Only
frontend/src/components/Banner.css. The markup is unchanged.Up to 480 px:
481–520 px: the smaller logo now starts below 520 px instead of 480. The full-size logo, the link and the switch need about 490 px, so the header stays on one row instead of wrapping on its own.
Above 520 px: unchanged.
Nothing scrolls sideways at any width from 320 px. At exactly 480 px the header now has two rows instead of one, because it uses the existing 480 px breakpoint. One row only fits with about 25 px to spare there.
Tests
e2e/header.spec.ts:npm run lint,npm run format:check,npm run build,npm run testandnpm run test:e2eall pass.How to check
npm run dev, then open DevTools device mode.