Repository navigation
Editor: Allow CSS custom properties in wp_sanitize_block_gap_value(). Fixes #66427. - #15277
noruzzamans wants to merge 1 commit into
Conversation
|
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:
|
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. |
Trac ticket: https://core.trac.wordpress.org/ticket/66427
Gutenberg PR: WordPress/gutenberg#82817
Description
Allows valid CSS custom property references (such as
var(--wp--preset--spacing--32)) inwp_sanitize_block_gap_value().When a theme defines a preset block gap in
theme.json(such asstyles.spacing.blockGap: "var:preset|spacing|32"):wp_get_global_styles()resolves the preset to its CSS variable format:var(--wp--preset--spacing--32).wp_sanitize_block_gap_value().wp_sanitize_block_gap_value()disallows parentheses to prevent CSS injection, the resolved preset was rejected and returnednull.wp_get_layout_style()fell back to0.5eminstead of using the theme's preset gap value.columnCountandminimumColumnWidth, columns stack into a single column.Testing Instructions