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

Add column-gap and row-gap as allowed CSS properties for compatibility with WP 6.0 #49118

Merged

Conversation

andrewserong
Copy link
Contributor

@andrewserong andrewserong commented Mar 15, 2023

What?

Add the missing column-gap and row-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 not row-gap and column-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 and row-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).

Copy link
Contributor

@apeatling apeatling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No typos
✅ Block gap works on social icons block in editor
✅ Block gap works on social icons block in front end

Screenshot 2023-03-16 at 1 40 56 PM

Screenshot 2023-03-16 at 1 42 35 PM

@andrewserong andrewserong merged commit 0ccb2d9 into trunk Mar 16, 2023
@andrewserong andrewserong deleted the update/6-1-css-compatibility-to-include-column-and-row-gap branch March 16, 2023 22:27
@github-actions github-actions bot added this to the Gutenberg 15.5 milestone Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants