Background Support: Allow modern color functions in standalone gradients#79791
Conversation
|
Flaky tests detected in 161758f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28548391374
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Brings the changes from the Core backport (WordPress/wordpress-develop#11384) back to Gutenberg, and moves the gradient KSES filter into the WordPress 7.1 compat folder.
Follow up to #75859.
Why?
The Core backport updates
safecss_filter_attr()directly to allow gradient background values. This PR aligns Gutenberg with tweaks made to Core's approach and relocates the shim so it is removed automatically once these changes reach Gutenberg's minimum supported WordPress version.How?
lib/experimental/kses.phpintolib/compat/wordpress-7.1/kses.php, so it is deleted along with that folder once 7.1 is the minimum supported version.rgb()andrgba()(such ashsl(),oklch()andcalc()), whether standalone or combined with aurl()image.gutenberg_allow_extended_gradient_backgroundsto reflect what it now covers.Testing Instructions
No manual testing needed. Coverage lives in the background support tests (
phpunit/block-supports/background-test.php). Wait for CI and the e2e tests to pass.