Problem
The HTML transformer correctly serializes source <img class="photo"> as canonical Gutenberg markup:
<figure class="wp-block-image photo"><img ...></figure>
The authored .photo selector therefore applies to the figure, but image-rendering declarations no longer reach the nested <img>. Fixed width/height, object-fit, and image backgrounds can be correct on the wrapper while the visible image renders at its natural aspect ratio.
Representative browser evidence showed a 123.30 × 106.50 source image and matching WordPress figure, but a 123.28 × 82.19 nested image.
Expected behavior
- Keep canonical core/image markup and editor validity.
- Retain the source selector on the figure for box geometry.
- Project selectors that matched source images onto the canonical nested image.
- Preserve source selector specificity, including explicit
img type selectors and pseudo states.
Acceptance criteria
.photo projects to .photo > :where(img) in author stylesheet assets.
img.photo projects through the canonical figure without adding noncanonical block attributes.
- Core/image remains valid canonical markup.
- Full PHP transformer contract, parity, and package-install suites pass.
- Representative browser evidence confirms nested image geometry matches its figure/source box.
AI disclosure
Diagnosed and implemented with openai/gpt-5.6-sol.
Problem
The HTML transformer correctly serializes source
<img class="photo">as canonical Gutenberg markup:The authored
.photoselector therefore applies to the figure, but image-rendering declarations no longer reach the nested<img>. Fixed width/height, object-fit, and image backgrounds can be correct on the wrapper while the visible image renders at its natural aspect ratio.Representative browser evidence showed a
123.30 × 106.50source image and matching WordPress figure, but a123.28 × 82.19nested image.Expected behavior
imgtype selectors and pseudo states.Acceptance criteria
.photoprojects to.photo > :where(img)in author stylesheet assets.img.photoprojects through the canonical figure without adding noncanonical block attributes.AI disclosure
Diagnosed and implemented with
openai/gpt-5.6-sol.