Skip to content

Preserve inherited anchor paint on native button promotion #765

Description

@chubes4

Problem

When a source anchor is promoted to native core/button, WordPress button defaults can replace inherited source foreground and text alignment even when the author did not declare either property on the anchor. Geometry and editable content remain correct, but brand text paint and glyph placement change.

Evidence

Fixture 89 round 12, transformer bf3845f650df0054135ba3c867fe2ae6f2c4fd6d, WP Codebox 68f920d8019bfb3352a32ba0bd2a6e234484231c. Evidence: /tmp/fixture-89-combined-v0184-round12/artifacts.

The page is exactly aligned at 1280x8067, with 170/170 native blocks, zero core/html, and 340/340 editor validation observations. Of 877 strict mismatch pixels:

  • Header brand label: 514 pixels because source inherits #f8fff9, candidate button link computes #fff.
  • Header brand mark: 24 pixels because source inherits text-align:start, candidate computes center.
  • Footer brand mark: 54 pixels from the same alignment replacement.

Source and candidate anchor boxes are identical. The mismatch is deterministic computed-style replacement, not anti-aliasing or geometry drift.

Direction

Preserve effective inherited foreground and text alignment when promoting source anchors to native button links. Keep explicit authored anchor values authoritative and avoid product/class-specific behavior.

Acceptance

  • A promoted anchor under a colored ancestor retains the source effective foreground when the anchor has no authored color.
  • A promoted anchor retains inherited start/end alignment instead of acquiring WordPress button centering.
  • Explicit anchor color/alignment declarations still win.
  • Native core/button output remains editor-valid with no HTML fallback.
  • Add computed-style or rendered parity coverage for header and footer brand variants.

AI assistance

OpenAI GPT-5.6 Sol using OpenCode analyzed complete source/candidate DOM and screenshot evidence and drafted this issue. Chris reviewed the scope and remains responsible for implementation decisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions