-
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
Quote blocks: add background image and minimum height support #62497
Conversation
… flexibility to display varying image heights, also opt in to minimum height for these blocks, 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" - there are quite a few controls here.
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.
Ignore this. It's pretty compact
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.
Yeah it doesn't bother me! Also helps with discoverability.
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.
Nice! This is a useful enhancement and works well in testing ✅
Thanks for the lightning fast reviews 🙇🏻 |
…ess#62497) Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
What?
This PR adds support for background images for the Pullquote and Quote blocks.
For flexibility to display varying image heights, it also opts in to minimum height for these blocks, but not as a default control.
Why?
The blockquote element has indentation — an inherit visual property that serves to differentiate it from surrounding text.
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 quote blocks to accommodate taller images.
How?
Turning on the block supports in block.json
Testing Instructions
Add a Quote and Pullquote block to a post.
Select background images for both, and play around with minimum height and other styles according to your delight.
Here's some HTML to get you started: