-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Verse block: add background image and minimum height support #62498
Conversation
… display varying image heights, also opt in to minimum height, but not as default controls
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. |
"backgroundImage": true, | ||
"backgroundSize": true, | ||
"__experimentalDefaultControls": { | ||
"backgroundImage": true |
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.
Should we collapse the background image tools panel by default?
I'm tending towards "yes" to avoid clutter.
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.
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.
…ss#62498) Co-authored-by: ramonjd <[email protected]> Co-authored-by: tellthemachines <[email protected]>
What?
This PR adds support for background images for the Verse block.
For flexibility to display varying image heights, it also opts in to minimum height, but not as a default control.
Why?
The Verse block contains a pre element that formats text as it would be presented in the browser. Top notch for poetry!
The ability to add background images extends visual differentiation, and allows users to set unique design patterns.
Example:
As for adding minimum height support, it ensures that users can adequately space Verse blocks to accommodate taller images.
How?
Turning on the block supports in block.json
Testing Instructions
Add a Verse block to a post.
Select a background image, and play around with minimum height and other styles according to your fancy.
Here's some HTML to get you started: