Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS: backport the 6.1 Core kses regex changes to Gutenberg for safecss_filter_attr_allow_css #44961

Closed
wants to merge 1 commit into from

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Oct 14, 2022

What?

Updates the gutenberg_safecss_filter_attr_allow_css_6_1 filter added in #43004 with the latest Core changes committed in WordPress/wordpress-develop@cb6f447

Props to @andrewserong for noticing that we hadn't backported the backport 🙇

Why?

So that Gutenberg's 6.1 compat matches the code that is in WordPress 6.1 Core.

How?

Copying over the new CSS filter regex from Core in order to allow min(), max(), minmax(), clamp() and var() values to be used in inline CSS.

Testing Instructions

The existing tests should pass, specifically those added in #43004

npm run test:unit:php -- --filter WP_Style_Engine_CSS_Declarations_Test
npm run test:unit:php -- --filter WP_Style_Engine_CSS_Rule_Test  

KSES: Allow min(), max(), minmax(), and clamp() values to be used in inline CSS
WordPress/wordpress-develop@cb6f447
@ramonjd ramonjd requested a review from spacedmonkey as a code owner October 14, 2022 04:21
@ramonjd ramonjd changed the title Backports the changes to kses.php in Core that made it into 6.1: CSS: backport the 6.1 Core kses regex changes to Gutenberg for safecss_filter_attr_allow_css Oct 14, 2022
@ramonjd ramonjd self-assigned this Oct 14, 2022
@ramonjd ramonjd added [Feature] Blocks Overall functionality of blocks Backwards Compatibility Issues or PRs that impact backwards compatability CSS Styling Related to editor and front end styles, CSS-specific issues. Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core labels Oct 14, 2022
@ramonjd ramonjd requested a review from andrewserong October 14, 2022 04:27
@ramonjd
Copy link
Member Author

ramonjd commented Oct 14, 2022

Closing in favour of #44962

@ramonjd ramonjd closed this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core Backwards Compatibility Issues or PRs that impact backwards compatability CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant