Skip to content

MWPW-180862: Respect section grid-width in how-to large-image/large-media variant - #6631

Open
DavidKHahn wants to merge 2 commits into
stagefrom
mwpw-180862-grid-width-fix
Open

MWPW-180862: Respect section grid-width in how-to large-image/large-media variant#6631
DavidKHahn wants to merge 2 commits into
stagefrom
mwpw-180862-grid-width-fix

Conversation

@DavidKHahn

@DavidKHahn DavidKHahn commented Sep 2, 2026

Copy link
Copy Markdown

Description

The how-to block's large-image/large-media variant ignored the section's grid-width-* setting. It used its own global container-width variable instead of the section's already-narrowed width, and a fixed 500px media column (plus a 460px list min-width) meant the block overflowed to ~1000px instead of the correct ~800px inside a grid-width-8 section.

Fix is scoped entirely to how-to.css:

  • Unset the block's own max-width when nested in a grid-width-* section, so it inherits the section's actual width (matches the existing pattern already used by text-block/icon-block).
  • Media and list columns now split evenly (minmax(0, 1fr) minmax(0, 1fr)) inside grid-width-* sections instead of a rigid 500px image column, matching the confirmed Figma spec (media = 380px = exactly half of the 800px section, minus gap, at grid-width-8).

Confirmed with design (Kyung Lee) that no changes to section-metadata.css were needed.

Figma tech spec: https://www.figma.com/design/FTIF5N4h0FWtbyjvUyrd32/How-To?node-id=2842-45117

Resolves: MWPW-180862

Test URLs

@aem-code-sync

aem-code-sync Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

  • Re-sync branch
Commits

…edia variant

The how-to block used its own global container-width variable instead of the
section's grid-width-*, and a fixed 500px media column caused it to overflow
past the section boundary. Media column now splits evenly with the list
(matching the 380px Figma spec for grid-width-8) when nested in a grid-width
section.
@DavidKHahn
DavidKHahn force-pushed the mwpw-180862-grid-width-fix branch from 3cfafec to 9bb8f0f Compare September 3, 2026 16:29
@DavidKHahn
DavidKHahn changed the base branch from main to stage September 3, 2026 16:29

@JasonHowellSlavin JasonHowellSlavin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nits. Looks good.

Comment thread libs/blocks/how-to/how-to.css
Comment thread libs/blocks/how-to/how-to.css
Addresses PR review comments on the leading-space indentation of the
newly added section[class*='grid-width-'] rules.

@Axelcureno Axelcureno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches the [class*='grid-width-'] pattern used elsewhere. One check: the new rule outranks .how-to.large-image.media-first .foreground, so media-first also goes 1fr 1fr in a grid-width section. Intended?

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Reminder to set the Ready for Stage label - to queue this to get merged to stage & production.

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.

3 participants