-
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
Add Text Alignment Support to the Pullquote Block #31996
Conversation
Just making a note that the failing check keeps encountering a timeout. The suite should run just fine locally. Also, please let me know if I should turn 8225d47 into a separate PR. |
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.
/* | ||
* 1. Defining `text-align` on the parent would get overwritten by the theme’s | ||
* defintion of the default style. | ||
* 2. When no text alignment is set, the solid color style aligns text to the | ||
* side, not center. | ||
* 3. Twenty Twenty-One has a hardcoded `text-align` on `blockquote::before`. | ||
* The only way to make the decorative quotation mark follow the same | ||
* alignment as its parent (both in the editor and on the front-end) is | ||
* by resetting the property with `!important`. | ||
*/ |
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.
Excellent CSS commenting style. 👍
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.
Plus one to that! 👏🏻
I can the see the PR has diverged a bit from the trunk over time. Once there is a clear desire to merge this in, I’ll be happy to resolve all the conflicts. Just let me know. |
👋 @porada, I did some testing to double-check whether this change has any impact on the iOS and Android apps. I didn't run into issues, but there have been some updates to block settings in the apps in the last few months that aren't included in this PR (more specifically, the introduction of global styles). It'd be great to test again when the PR's updated from trunk, so that we can confirm that all the settings still work as expected on mobile. Would you be able to give me a ping whenever this PR's updated? I'll follow along with this issue for any updates, too. Thanks! |
Hi, @porada Can you rebase this branch on top of the current trunk? Thanks |
Text align was added to the block in #30951. |
Description
This PR adds support for specifying text alignment inside the Pullquote block using a block toolbar control.
Our users expect the center alignment option to be available (#22784, #31558, Automattic/wp-calypso#52519), because it used to also align the text inside the quote to center. That option was removed probably with the introduction of the Solid Color block style which aligned text to the side. This PR allows the user to overwrite the default alignment defined by any of the available block styles.
Behind the scenes, this PR also adds support for the
placeholder
attribute in the standardAlignmentToolbar
control. This allows the control to reflect the currently used setting without explicitly setting the value.How has this been tested?
npm run test-unit
Screenshots
Types of changes
New feature
Checklist
*.native.js
files for terms that need renaming or removal).