Skip to content

Preserve CSS-significant semantic geometry#627

Merged
chubes4 merged 1 commit into
trunkfrom
fix/624-preserve-semantic-geometry
Jul 18, 2026
Merged

Preserve CSS-significant semantic geometry#627
chubes4 merged 1 commit into
trunkfrom
fix/624-preserve-semantic-geometry

Conversation

@chubes4

@chubes4 chubes4 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve independently styled inline semantic leaves when paragraph/RichText lowering would lose selector identity or flex/grid item geometry
  • retain selector-compatible inline hooks in valid Gutenberg RichText, including dynamic pseudo-state projection
  • preserve responsive SVG width and intrinsic viewBox aspect ratio using Gutenberg-canonical image save markup
  • strengthen source-anchor selector projection for native Button blocks

Refs #624. This is a measured intermediate improvement for Automattic/static-site-importer#489; it does not claim exact visual parity or make 15-saas eligible for solved-fixture promotion.

Results

Supplementary Lab evidence: run summary. The exact-parity gate still fails because lower-page attribution is truncated by the current 160-element visual-compare capture.

How to test

  1. Check out this branch in a fresh clone.
  2. Run cd php-transformer && composer test.
  3. Run php tests/unit/author-selector-semantics.php; confirm all 21 assertions pass.
  4. Run php tests/contract/run.php.
  5. Run php tests/parity/run.php; confirm all 244 fixtures pass.
  6. Run Static Site Importer's documented fixture-matrix wrapper against this checkout with the authored saas tag and exact visual gating.
  7. Confirm all 291 blocks are editor-valid and native, no core/html blocks are emitted, and the aligned mismatch is 18.34%.

Backwards compatibility

This changes generated block markup and projected author CSS for selector-addressed inline leaves, responsive materialized SVGs, and promoted Button controls. It does not change the public PHP API. Consumers comparing generated markup byte-for-byte may observe intentional output changes.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI gpt-5.6-sol via OpenCode
  • Used for: Diagnosed browser evidence, implemented and reviewed generic transformer primitives, added deterministic coverage, and prepared the PR.

@chubes4
chubes4 merged commit 4e22284 into trunk Jul 18, 2026
1 check passed
@chubes4
chubes4 deleted the fix/624-preserve-semantic-geometry branch July 18, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant