Skip to content

Attach button inner-fill combinators to every selector - #1307

Merged
chubes4 merged 2 commits into
trunkfrom
fix/1305-button-fill-selector-list
Aug 28, 2026
Merged

Attach button inner-fill combinators to every selector#1307
chubes4 merged 2 commits into
trunkfrom
fix/1305-button-fill-selector-list

Conversation

@chubes4

@chubes4 chubes4 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Closes #1306.

Problem

#1304 appends > .wp-block-button to the wrapper prelude. When that prelude lists desktop and mobile markers, CSS applies the combinator only to the last selector:

:where(.control-163):where(.wp-block-buttons),
:where(.control-172):where(.wp-block-buttons)> .wp-block-button {
  width: 100% !important;
}

The first selector is .wp-block-buttons { width: 100% }. After #1304, Nimbus Contacts wrapper is 1440px and the inner link is still 7×88.

Change

Split the prelude and append the combinator to each selector.

Coverage

tests/unit/button-wrapper-fill-selector-list.php fails on trunk (combinator only on the last marker) and passes here. composer test exits 0.

AI assistance

Claude Sonnet 4.5 via OpenCode measured the v8 import after #1304 and implemented the split. Chris Huber reviewed.

Appending > .wp-block-button to a comma-separated wrapper prelude applied
the child combinator only to the last marker. The first selector became
.wp-block-buttons { width: 100% }, expanding the wrapper to the header
and leaving the inner link at 7px.

Split the prelude and append the combinator to each selector.
box-sizing:border-box on the inner control moved the border box of source
buttons that already filled their wrapper. The 15-saas solved fixture
regressed by 6 pixels on bordered .tier-cta controls.

Emit width only.
@chubes4

chubes4 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

The solved-site-promotion gate initially failed here: 15-saas regressed by 6/9955320 pixels.

Cause was #1304's box-sizing:border-box on the inner control, not the selector-list split. 15-saas has .tier-cta { width: 100% } on .btn-outline controls carrying border: 1px solid; switching those to a border box moved their edges.

Fixed in d429aa1 by emitting width only. Gate is green.

AI assistance: Claude Sonnet 4.5 via OpenCode read the gate evidence, traced the fixture CSS, and made the change. Chris Huber reviewed.

@chubes4
chubes4 merged commit a7dd902 into trunk Aug 28, 2026
10 checks passed
@chubes4
chubes4 deleted the fix/1305-button-fill-selector-list branch August 28, 2026 13:41
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.

Button inner-fill combinator applies only to the last selector in a list

1 participant