Skip to content

Avoid paragraph flow around standalone block-participating inline leaves #762

Description

@chubes4

Problem

A standalone inline semantic element that participates as a block/layout child can be wrapped in a generated paragraph. Core paragraph margins then alter parent grid geometry even though the source leaf already owns its display and margin contract.

Evidence

Fixture 89, transformer d40ac8e2ef1504fcc69ca4a63d2283db11c17cba, WP Codebox 0.18.4. Full passing artifacts: /tmp/fixture-89-combined-v0184-round7-retry/artifacts.

Source fallback cards contain a direct <strong> with display:block; margin:12px 0 4.8px. Candidate keeps <strong> but nests it in p.wp-block-paragraph with margin:16px 0.

  • Source fallback grid height: 141.13px.
  • Candidate: 156.33px.
  • Exact local delta: +15.203px.

Acceptance

  • Preserve standalone block-participating inline leaves without generated paragraph flow margins.
  • Retain source class/tag selector addressability, order, display, and authored margins.
  • Keep ordinary phrasing content in native paragraphs.
  • Preserve native/editor-valid output without core/html.
  • Add rendered geometry coverage for direct strong/span leaves under grid/flex and normal prose negatives.

AI assistance

OpenAI GPT-5.6 Sol using OpenCode analyzed complete source/candidate DOM and drafted this issue. Chris reviewed the evidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions