Automattic / Automattic/blocks-engine

Avoid paragraph flow around standalone block-participating inline leaves

Open
#762 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## 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 `` with `display:block; margin:12px 0 4.8px`. Candidate keeps `` 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.

Contributor guide

Open the contributing guide

Research direction

Start with fixture 89 and the complete source/candidate DOM artifacts at /tmp/fixture-89-combined-v0184-round7-retry/artifacts, using transformer d40ac8e2ef1504fcc69ca4a63d2283db11c17cba to locate the paragraph-wrapping path. Compare direct strong/span leaves under grid or flex with ordinary prose, then verify rendered geometry, selector addressability, authored margins, and native/editor-valid output against the acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, php, wordpress
Domain
frontend, testing, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.