-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
JSON schema: Update schema for background support #59127
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Thanks for fixing this up @t-hamano, and for the great testing instructions, that made it easy to double-check that it's working correctly!
but one point that confused me is that backgroundSize actually covers three things: background-size, background-position, and background-repeat. That's why I mentioned it in the description.
Yes, it isn't obvious at first, but during work on the features it became apparent that repeat and position controls cannot reasonably exist separately to backgroundSize
, so it would be better for the features to be consolidated in terms of settings, into the catch-all of backgroundSize
.
If we wanted to make this grouping clearer, we could perhaps adjust the wording in the schema to something like Allow blocks to define values related to the size of a background image, including size, position, and repeat controls
.
That said, I like the wording you've gone with, so this LGTM, too! ✨
@andrewserong Thanks for the review!
I also feel that this is more clear 👍 theme.json: block.json: |
Nice tweaks there, that reads well to me! |
Flaky tests detected in f53f565. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7953100288
|
Oh sorry, I forgot to update the prop... |
No worries! 😄 |
Isn't this feature enabled by default? Should it be true, not false? |
Follow up #53934 and #57005
What?
This PR adds and updates background support definitions in theme.json and block.json.
Why?
To enhance the developer experience.
How?
I've updated the description to reflect the actual implementation, but one point that confused me is that
backgroundSize
actually covers three things:background-size
,background-position
, andbackground-repeat
. That's why I mentioned it in the description.Testing Instructions
theme.json
theme.json.mp4
block.json
block.json.mp4