Add column-gap and row-gap as allowed CSS properties for compatibility with WP 6.0 #49118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Add the missing
column-gap
androw-gap
CSS properties to the list of safe CSS properties for compatibility with WordPress 6.0.Why?
When #40875 was introduced, it added in the
gap
CSS property, but notrow-gap
andcolumn-gap
. However, when the required layout CSS properties were expanded in core in WordPress/wordpress-develop#2928, these additional properties were included, and have been subsequently used in other features, e.g. #46388 where they're used for validating indirect properties.To ensure support for WordPress 6.0, let's make sure these two properties are included. This issue was raised in #46983 which seeks to add a test job that tests against the previous WP version. For more context I've added a comment to that PR over in #46983 (comment)
How?
Add
column-gap
androw-gap
to the list of allowed CSS properties.Testing Instructions
The easiest "real" way to test this would be to apply this on top of #46983 and see if the tests against WP 6.0 pass.
For now, simply check that I haven't made any typos, and that saving block gap values still works within the editor and saved to the site front end (e.g. add a Social Icons block and set some spacing and save, and check that the front-end still looks correct).