Skip to content

Hero: make the video backdrop fill the block (100%)#12

Merged
lamontacrook merged 2 commits into
mainfrom
hero-video-fill
Jul 8, 2026
Merged

Hero: make the video backdrop fill the block (100%)#12
lamontacrook merged 2 commits into
mainfrom
hero-video-fill

Conversation

@lamontacrook

Copy link
Copy Markdown
Contributor

What

Follow-up to #11. The hero video backdrop wasn't filling the block — it rendered at its intrinsic size (e.g. 1440×550) inside a differently-sized hero, leaving gaps.

Cause

The <video> element itself carries the .hero-media class, so the rule .hero .hero-media video (a descendant selector) never matched it, and the video got no sizing.

Fix

Size .hero-video directly to width/height: 100% with object-fit: cover, and drop the dead .hero-media video selector. Verified the video now measures exactly the hero box (1280×600) with object-fit: cover.

Test URLs

(View on desktop ≥900px — per #11 the video is gated to larger viewports; mobile shows the poster.)

🤖 Generated with Claude Code

The <video> element itself carries the .hero-media class, so the descendant
selector `.hero-media video` never matched it and the video rendered at its
intrinsic size (e.g. 1440x550) instead of filling the hero. Size .hero-video
to 100% width/height with object-fit:cover so it fully covers the block.

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

aem-code-sync Bot commented Jul 8, 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

@aem-code-sync

aem-code-sync Bot commented Jul 8, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 /en/us PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/us PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

The authored video (and its poster) is a finished creative with its own
headline and CTA, which duplicated and clashed with the overlaid hero text and
was muted by the darkening gradient. For the `video` variant, hide the
.hero-content overlay and drop the ::after gradient so the media shows
edge-to-edge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lamontacrook
lamontacrook merged commit 206b72d into main Jul 8, 2026
2 checks passed
@lamontacrook
lamontacrook deleted the hero-video-fill branch July 8, 2026 21:47
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