Skip to content

Respect linked CSS flex layout for card groups#113

Merged
chubes4 merged 1 commit into
trunkfrom
fix/php-transformer-flex-card-layout
Jun 24, 2026
Merged

Respect linked CSS flex layout for card groups#113
chubes4 merged 1 commit into
trunkfrom
fix/php-transformer-flex-card-layout

Conversation

@chubes4

@chubes4 chubes4 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use merged source presentation CSS when inferring WordPress group layout attributes.
  • Treat plural card wrapper classes as high-value styled elements so linked CSS can override broad class-name grid heuristics.
  • Add parity fixture coverage for a services-cards wrapper whose linked CSS declares display:flex.

Root cause

Figma/static HTML can use class names like *-cards for flex rows. The PHP transformer previously inferred WordPress layout.type=grid from the class name before considering linked stylesheet declarations, which can make imported WordPress blocks collapse/overlap even when source CSS uses flex.

Testing

  • php tests/parity/run.php
  • php tests/contract/run.php
  • Verified the Fisiostetic fixture's affected servicr-cards wrappers serialize with source flex styles instead of WordPress grid layout.

AI assistance

  • AI assistance: Yes
  • Tool(s): openai/gpt-5.5 via OpenCode
  • Used for: Investigation, patch drafting, regression fixture, and local verification.

@chubes4 chubes4 merged commit f3b7bd6 into trunk Jun 24, 2026
1 check passed
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