Skip to content

v0.13.5-pl.2

Choose a tag to compare

@TBarregren TBarregren released this 13 May 14:21
· 53 commits to main since this release

Step 5 follow-up — frontend padding fix

User-reported regression: the Elevation block's chart SVG swallowed the user's spacing.padding band on the frontend. With aspect-ratio 4:1 and non-zero left/right padding, the wrapper background was visible only in the editor — the frontend rendered the chart edge-to-edge.

Root cause

The Step 3 follow-up release (v0.13.3-pl.1) fixed three SVG-sizing regressions by absolute-positioning the chart SVG with inset: 0. An absolutely-positioned element's containing block is its nearest positioned ancestor's padding-box, so the SVG covered the wrapper's padding band on the frontend. The editor masked the symptom because Gutenberg's .block-editor-block-list__block wrapper sets box-sizing: content-box.

Fix

Switch the wrapper to display: flex; flex-direction: column and make the chart SVG the single flex item with flex: 1 1 0; min-width: 0; min-height: 0. A flex item respects the container's padding by construction, regardless of box-sizing. The min-*: 0 declarations override the flex algorithm's intrinsic-min floor and prevent the SVG's viewBox-derived dimensions from setting a height floor on the wrapper — the same role position: absolute played in v0.13.3-pl.1 for the three Step 3 follow-up bugs (stale aspect-ratio after Original-reset, freshly inserted block at 300×150, frozen chart when min-height grows).