-
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
Add color support to the quote block #39899
Conversation
@@ -1,4 +1,5 @@ | |||
.wp-block-quote { | |||
box-sizing: border-box; |
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.
Applying box-sizing: border-box to the quote block might have a small impact on the themes frontend. But I expect that most themes already do this somehow, if not, this might fix some bugs if they add paddings to quotes... But it's still an impactful change we need to check.
(Similar to #39895 for lists)
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.
CC: @ramonjd @scruffian
I wonder if we should re-apply this in the vanilla stylesheet. We recently removed an editor-only style so at least the frontend and backend were consistent, but without this rule applied, border rules are kind of terrible across all blocks. We can apply it one by one to every block that gets border support, but maybe this is a reason to add it in a blanket form again?
Size Change: +31 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
The color panels are working as intended! I've tested on Twenty (TwentyOne|TwentyTwo|Nineteen|Seventeen). This is on TwentyTwentyTwo:
Also agree. I'd say since background color is a new feature, folks would presumably add padding in the editor (if we make it available) at the same time as adding a background color. It might also avoid some inconsistencies. For example TwentyTwenty defines padding for quotes in the editor,, which overwrites the default block padding ( But in the frontend the default block padding kicks in. This is also the case for TwentyNineteen. |
I have tested the PR with a few classic themes and block themes and it is working well. |
Anyone to ✅ the PR |
e83c271
to
3c8c92e
Compare
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.
Works as intended:
I think we should revisit #39899 (comment) and consider whether we don't need that rule in a blanket way. Try a variety of blocks with border support, such as heading and group, and it's quickly apparent that it's a weird behavior. If we add it here, we should add it everywhere.
What?
This PR adds color support (background, text, link) to the quote block.
Why?
I think it can be handy to be able to apply the same text color (or link, background) to the whole quote (all paragraphs and cite) in one go. Especially now that we're working on the V2 version of the quote block which leverages inner block.
How?
There's a number of important considerations. (See inline comments in the PR):
Testing Instructions
(This PR works for both v1 and v2 of the block, so you can try both)
cc @WordPress/block-themers @WordPress/theme-team