Repository navigation
Global Styles: Put text clip escapes on a block's feature selectors - #15432
aaronrobertshaw wants to merge 3 commits into
Conversation
The text clip check ran after feature selector extraction had removed a state's color and background styles. So it missed text colors and gradients set at a breakpoint, on :hover or in a block style, and any reset landed on the block's main selector. The check now reads the theme.json data. The text fill reset goes on the block's color feature selector and the clip escape on its background one, where those styles are output.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
ramonjd
left a comment
There was a problem hiding this comment.
Checked against source PR and it's a faithful backport.
I guess we need to land #15366 before this PR?
Also, I guess it might be wise to hold off committing this until later in the 7.2 cycle to prevent any conflicts with incoming changes/bug fixes for that release.
Backport of Gutenberg PR WordPress/gutenberg#86246
Trac ticket: https://core.trac.wordpress.org/ticket/66465
Text colours set over a text gradient now show on blocks that style an inner element, like the Search button. This covers colours set at a breakpoint, on
:hoverand in a block style.This PR backports:
colorfeature selector and the clip escape on itsbackgroundone,WP_Theme_JSONtests.Note
This PR and #15366 both add the text clip check to a block style's main rule. This PR and #15433 both change the pseudo-state call in
process_pseudo_selectors()and its breakpoint variation caller. Whichever merges second needs a small rebase.Testing instructions
theme.json:On trunk the same rule has only
color: #0b3d91;, so the button text stays transparent and keeps the gradient.Use of AI
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: The mechanical port, tests and description; I reviewed and edited them.