#60175 closed enhancement (fixed)
Add background size and repeat to the background image block support
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Editor | Keywords: | gutenberg-merge has-patch has-unit-tests |
Focuses: | Cc: |
Description
Following on from #59357, in the Gutenberg plugin, features for background size and background repeat have been added to the editor's design tools for the background image block support.
It would be good to backport these features for the WP 6.5 release. While the features are spread across JS and PHP code, it should be safe to land the PHP changes in advance of the JS packages update for core.
The original features landed in the following Gutenberg PR: https://github.com/WordPress/gutenberg/pull/57005
Change History (5)
This ticket was mentioned in PR #5828 on WordPress/wordpress-develop by @andrewserong.
14 months ago
#1
- Keywords has-patch has-unit-tests added
@andrewserong commented on PR #5828:
13 months ago
#2
Small update to also include the changes from https://github.com/WordPress/gutenberg/pull/57495 in this backport.
#3
@
13 months ago
- Owner set to isabel_brison
- Resolution set to fixed
- Status changed from new to closed
In 57254:
@isabel_brison commented on PR #5828:
13 months ago
#4
Committed in r57254.
@andrewserong commented on PR #5828:
13 months ago
#5
Thanks for reviewing and committing! 🙇
Add support for background size and background repeat to the background image block support, as used by the Group block.
This PR backports the PHP parts of the following Gutenberg PRs: https://github.com/WordPress/gutenberg/pull/57005 and https://github.com/WordPress/gutenberg/pull/57474
This PR only backports the PHP parts of the feature, however it can safely land prior to the JS packages updates for WP 6.5 as users will not be able to manually use these features in the editor until the JS packages are updated.
### Testing instructions
In a post or page of a site running TT4 theme, add the following markup in the code editor view. It contains a Group block with a background image set to a size of
contain
and a repeat ofno-repeat
:A group block with a background image
The view in the editor will not reflect the background size and repeat rules yet, however with this PR, the site frontend's view should reflect that the image is contained within the area of the Group, is centered by default, and is set to not repeat:
Trac ticket: https://core.trac.wordpress.org/ticket/60175