Skip to content

Fix footer-legal to span full width and reach the footer's true bottom - #28

Merged
samshao merged 1 commit into
mainfrom
footer-legal-full-width
Aug 10, 2026
Merged

Fix footer-legal to span full width and reach the footer's true bottom#28
samshao merged 1 commit into
mainfrom
footer-legal-full-width

Conversation

@samshao

@samshao samshao commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes footer-legal (the gray band below the black footer, PR #25/#27) so it spans the full page width and reaches the footer's true bottom edge, instead of sitting centered at 1240px with a 32px gap below it.

Root cause: footer.css's footer .footer > div rule applied its 1240px-max-width/centered/padded box to the shared wrapper that both the black footer's columns section and the footer-legal section sit inside (footer.js flattens the fragment's sections into one plain, unconstrained wrapper div) — so that one rule constrained both sections together as a unit, not individually. footer-legal's own full-bleed override on .footer-legal-container alone couldn't undo that, since the constraint lived on their shared parent, not on the section itself. The same rule's 32px bottom padding, applied once to the wrapper, is also what left the gap after whichever section happened to be last.

Fix: retarget the rule to each .section child individually — the same pattern main > .section > div already uses to let page-level sections (e.g. cards-panel's own full-bleed override) size independently — so footer-legal's override can correctly widen just itself. Bumped that override's specificity so it wins regardless of stylesheet load order.

Verified at 390px and 1464px: full width, 0px gap to the footer's bottom edge (was 32px), columns section above unaffected.

Test URL

https://footer-legal-full-width--modernization-agent-test--samshao.aem.page/

🤖 Generated with Claude Code

Root cause: footer.css's own "footer .footer > div" rule applied its
1240px-max-width/centered/padded box to the shared wrapper div that both
the black footer's columns section AND the new footer-legal section sit
inside — footer.js flattens the fragment's sections into one plain,
unconstrained wrapper div, so that single rule was constraining both
sections together as one unit, not each individually. footer-legal's own
full-bleed override on .footer-legal-container alone couldn't undo that:
the constraint was on their shared *parent*, not on the section itself, so
no override on the section could widen it. This also explains the leftover
gap at the very bottom — the wrapper's own 32px bottom padding applied
once, after whichever section happened to be last.

Fix: retarget footer.css's rule to each ".section" child individually
(matching how main > .section > div already lets page-level sections like
cards-panel differ from each other instead of all sharing one box), so
footer-legal's own override can correctly widen just itself. Bumped that
override's own specificity to guarantee it wins regardless of stylesheet
load order (block CSS loads when each block decorates, and footer-legal
decorates as a block nested inside footer's own fragment, so there's no
hard guarantee footer.css settles first).

Verified at 390px and 1464px: footer-legal now spans the full viewport
width and its bottom edge lines up exactly with <footer>'s own bottom (0px
gap, was 32px), with the columns section above unaffected.

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

aem-code-sync Bot commented Aug 10, 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 Aug 10, 2026

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

@samshao
samshao merged commit 36949dd into main Aug 10, 2026
3 checks passed
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