-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Background: add background attachment support to theme.json styles #6991
Background: add background attachment support to theme.json styles #6991
Conversation
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. |
e5721aa
to
e9071bf
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the 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. |
@@ -237,6 +237,7 @@ class WP_Theme_JSON { | |||
'background-position' => array( 'background', 'backgroundPosition' ), | |||
'background-repeat' => array( 'background', 'backgroundRepeat' ), | |||
'background-size' => array( 'background', 'backgroundSize' ), | |||
'background-attachment' => array( 'background', 'backgroundAttachment' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the property in docblock with @since
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code change looks good to me and is testing nicely in the site frontend 👍
For anyone else reviewing, some of the PHP changes in block-supports/background.php
also include changes from #6836, as mentioned in the PR description, so it looks like that PR should land first. Factoring in #6836, the changes here match the expected changes from WordPress/gutenberg#61382 👍
LGTM!
1ab0c30
to
1ea4884
Compare
@ramonjd: Is this ready to commit? |
Oh yes, please!! |
I intended that as a nudge for you... 😂 You win this round, I was unclear. |
Haha. No worries. I mistakenly assumed there was some rule about committing your own patches. |
1e4861a
to
8485950
Compare
Thanks! |
Syncing changes from WordPress/gutenberg#61382
Note
This PR should be committed after #6836 to ensure a clean rebase 😄
Testing
Unit tests:
This PR adds the backend functionality only, which means the editor UI isn't yet available.
To test, define a background image for the site in theme.json.
Here's an example using an image in src/wp-content/themes/twentytwentyfour/
Now check the site:
2024-07-22.14.26.52.mp4
Trac ticket: https://core.trac.wordpress.org/ticket/61720
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.