Skip to content

Preserve spacing for vertical imported group wrappers#227

Open
homeboy-ci[bot] wants to merge 1 commit into
mainfrom
fix/frontend-group-layout-gap-bridge
Open

Preserve spacing for vertical imported group wrappers#227
homeboy-ci[bot] wants to merge 1 commit into
mainfrom
fix/frontend-group-layout-gap-bridge

Conversation

@homeboy-ci
Copy link
Copy Markdown
Contributor

@homeboy-ci homeboy-ci Bot commented May 14, 2026

Summary

  • Extend the imported group layout gap bridge so WordPress vertical group wrappers (.wp-block-group.is-vertical) do not reintroduce block gap spacing that was not present in the source static HTML.
  • Keep the existing frontend/editor bridge scoped to generated imported themes rather than changing DOM-to-block conversion.

Evidence

  • Source generated-site repo/PR: chubes4/wp-site-generator#242
  • Validation run: 25882026544
  • Artifact: visual-parity-issue-240-wickstead-refill-works
  • Affected site: issue-240-wickstead-refill-works
  • Signal: visual parity failed at 25.01% mismatch with dimension mismatch (source=1280x4840, imported=1280x4884).
  • Top affected selector/region: screenshot region 32,192 1216x3328; source main#main, imported main#wp--skip-link--target.entry-content.wp-block-post-content.is-layout-flow.
  • Concrete wrapper evidence: imported hero emitted as section#top.wp-block-group.hero.is-vertical with a taller rect (1180x1311) than the source section#top.hero (1180x1064), shifting downstream regions.
  • Related downstream regions show the same vertical offset in .wp-block-group.section-heading.is-layout-flow, .wp-block-group.table-wrap.is-layout-flow, and .wp-block-group.caution-label.is-layout-flow.

Patch path

  • Owning repository: static-site-importer because the repair is in generated theme CSS/layout bridging, not the source HTML-to-block conversion registry.
  • Architecture anchor: Static_Site_Importer_Theme_Generator::imported_group_layout_gap_bridge_css() already neutralizes imported .wp-block-group.is-layout-flow margins and .is-layout-flex gaps.
  • Smallest repair: include .wp-block-group.is-vertical in the same generated CSS bridge so WordPress vertical group layout gap does not add spacing on top of source-authored CSS.

Tests

  • Not run in this pipeline step. The nearest existing regression family is tests/StaticSiteImporterFixtureTest.php / tests/smoke-editor-style-support.php, which already asserts this bridge is emitted for layout-flow/flex generated styles. This patch is the same bridge extension for the observed vertical wrapper class.

AI assistance disclosure

Prepared by an AI agent in response to the SSI visual parity finding packet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants