Skip to content

Close the empty red strip above the breaking-news headline - #106

Merged
ssavutu merged 1 commit into
mainfrom
fix/breaking-banner-blank-strip
Sep 3, 2026
Merged

Close the empty red strip above the breaking-news headline#106
ssavutu merged 1 commit into
mainfrom
fix/breaking-banner-blank-strip

Conversation

@ssavutu

@ssavutu ssavutu commented Sep 3, 2026

Copy link
Copy Markdown
Member

The banner renders as a 72px band with the headline sitting low in it — an empty red strip above the text, visible on the live homepage now that a real breaking story is up.

Why it happened

24px of that gap is padding the box carries deliberately, on the theory that #scrollnav covers the top of the banner and the padding keeps the text below the covered strip.

The nav covers nothing. Measured on the live homepage:

nav bottom: 207   band top: 207   →  gap 0, no overlap
band height: 72   (all of it visible)
text: 243→267     →  36px above, 12px below

The nav carries mb-[24px] and the banner mt-[-24px], and as adjacent siblings those margins collapse to 24 + -24 = 0. The pull-up never moves the banner under the nav — it just closes the nav's margin so the red sits flush, exactly what the hero does when it is the first block after the nav (see the comment in Banner.astro). So all 72px rendered and the padding showed as an empty strip.

The fix

Drop the padding and size the box at the 48px it was always meant to be. The pull-up stays: the nav's margin still needs closing.

The link overlay goes back to inset-0 for the same reason. I had pinned it to the bottom 48px to stay clear of the strip the nav was believed to cover; with no such strip, that is simply the whole box.

before after
band height 72px 48px
blank above text 36px 12px
blank below text 12px 12px
gap to nav 0 0 (still flush)

Testing

Measured in headless Chromium against a stubbed /v1/homepage: band is 48px, still flush with the nav, headline centred 12/12. elementFromPoint returns the article link at the band's centre and at both edges, and returns something else 5px above the band — so the overlay covers the banner without reaching into the nav.

That also closes the caveat I left on #105: the click target is now verified by hit-testing in a real browser, not just from the markup and generated CSS.

astro check (0 errors) and npm run build pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ES8gPZxe6sb5xSLrBZ7AGk

The banner rendered as a 72px band with the headline sitting low in it:
36px of red above the text against 12px below. The 24px of that gap was
padding the box carries deliberately, on the theory that #scrollnav above
covers the top of the banner and the padding keeps the text below the
covered strip.

The nav covers nothing. Measured on the live homepage, the nav's bottom
and the banner's top are both at y=207 -- a gap of exactly 0. The nav
carries mb-[24px] and the banner mt-[-24px], and as adjacent siblings
those margins COLLAPSE to 24 + -24 = 0. The pull-up never moves the banner
under the nav; it just closes the nav's margin so the red sits flush,
which is the same thing the hero does when it is the first block after the
nav (see Banner.astro). So all 72px were visible and the padding showed as
an empty strip.

Drop the padding and size the box at the 48px it was always meant to be.
The pull-up stays -- the nav's margin still needs closing. `items-center`
now centres in the real band: 12px above the headline and 12px below.

The link overlay goes back to inset-0 for the same reason. It was pinned
to the bottom 48px to stay clear of the strip the nav was believed to
cover; with no such strip that is simply the whole box.

Verified in headless Chromium: the band is 48px, still flush with the nav,
the headline is centred, and elementFromPoint returns the article link at
the band's centre and both edges but not above it, so the overlay covers
the banner without reaching into the nav.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ES8gPZxe6sb5xSLrBZ7AGk
@ssavutu
ssavutu merged commit 8807bc4 into main Sep 3, 2026
1 check passed
@ssavutu
ssavutu deleted the fix/breaking-banner-blank-strip branch September 3, 2026 10:42
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.

1 participant