Skip to content

fix: halve gap between article hero image and body text - #140

Merged
dosteinacher merged 1 commit into
mainfrom
fix/article-header-image-gap
Aug 18, 2026
Merged

fix: halve gap between article hero image and body text#140
dosteinacher merged 1 commit into
mainfrom
fix/article-header-image-gap

Conversation

@dosteinacher

Copy link
Copy Markdown
Collaborator

Problem

On blog post pages, the vertical gap between the feature/hero image and the first paragraph of body text was much larger than intended (~192px on desktop/tablet, 64px on mobile).

Cause

The hero image and the body copy render as two separate main .section elements. Generic section spacing rules in styles/styles.css stack up between them:

  • hero section: padding-bottom: 64px
  • body section: margin-top: 64px + padding-top: 64px

Fix

Added a scoped rule in blocks/article-header/article-header.css targeting only the article-header section and the section immediately following it, halving each contributing value (64px → 32px). This keeps the change local to the hero-image-to-body transition and doesn't affect spacing between other sections on this or other pages.

Result: gap goes from ~192px → ~96px on desktop/tablet, and 64px → 32px on mobile.

🤖 Generated with Claude Code

The hero/feature image section and the body section each contributed
64px of margin/padding, stacking to ~192px of whitespace between the
image and the first paragraph on desktop/tablet (64px on mobile).
Scope a targeted rule to the article-header section and the section
right after it so only this gap is halved, leaving other section
spacing on the site untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Aug 18, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@dosteinacher
dosteinacher merged commit 8e100b1 into main Aug 18, 2026
2 of 4 checks passed
@dosteinacher
dosteinacher deleted the fix/article-header-image-gap branch August 18, 2026 10:10
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