Root cause (pervasive)
The transformer emits raw inline CSS as a style STRING attribute on core blocks:
wp:paragraph {"className":"hero-eyebrow","style":"display:flex;align-items:center;..."}
wp:heading {"style":"font-size:clamp(4rem,11vw,8rem);color:var(--rose-deep)"}
wp:group {"style":"padding:clamp(...);background:radial-gradient(...)"}
Core blocks expect a structured style OBJECT (style.typography/style.color/style.spacing/style.border) + the layout attribute — NOT a raw CSS string. So the stored <p style="..."> doesn't match the block's save() output → the editor throws "This block contains unexpected or invalid content" for nearly every styled element (a wall of invalid blocks).
Detection vs fix
Ask (generalize #241 to all blocks)
In the Style/ layer (StyleResolutionTrait, post-slice-5) + BlockFactory + the block-emission path, translate resolved CSS into canonical block attributes for ALL emitted blocks:
Generic; no fixture strings. This is the central style-fidelity + block-validity fix — it eliminates the invalid-block wall AND makes imports actually look right. Closes #259 (hidden-state half) too.
Root cause (pervasive)
The transformer emits raw inline CSS as a
styleSTRING attribute on core blocks:Core blocks expect a structured
styleOBJECT (style.typography/style.color/style.spacing/style.border) + thelayoutattribute — NOT a raw CSS string. So the stored<p style="...">doesn't match the block'ssave()output → the editor throws "This block contains unexpected or invalid content" for nearly every styled element (a wall of invalid blocks).Detection vs fix
validateBlock) flags these as gating findings on a live run — good, not silent.stylestrings. Buttons were fixed for exactly this (Style fidelity: translate source CSS button styling onto native core/button attributes #241 → nativestyle.color.*), but only buttons. Paragraph/heading/group/etc. still emit raw strings → the bulk of the invalid blocks.Ask (generalize #241 to all blocks)
In the
Style/layer (StyleResolutionTrait, post-slice-5) +BlockFactory+ the block-emission path, translate resolved CSS into canonical block attributes for ALL emitted blocks:style.typography.{fontSize,fontWeight,lineHeight,letterSpacing,textTransform}style.color.{background,text}/backgroundColor/textColorstyle.spacing.{padding,margin,blockGap}style.border.*layoutattributeclassName+ carried CSS (theme/companion plugin). NEVER a rawstylestring on a core block.display:none/visibility:hidden/opacity:0from responsive/JS-revealed base states.Generic; no fixture strings. This is the central style-fidelity + block-validity fix — it eliminates the invalid-block wall AND makes imports actually look right. Closes #259 (hidden-state half) too.