-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Pullquote: add block support #30951
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
Merged
ramonjd
merged 12 commits into
WordPress:trunk
from
ramonjd:add/pullquote-block-border-color-support
Jul 20, 2021
Merged
Pullquote: add block support #30951
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aed3003
initial commit
ramonjd 1e806be
Updating fixtures and deprecated fixtures.
ramonjd c998b6f
Removed block attributes from block.json that block supports injects
ramonjd 681b057
Renaming and updating deprecation v4 colors to reflect the usage of c…
ramonjd 7dd4656
Implementing code change suggestions in deprecated.js
ramonjd cb7322e
This commit ensures that we're setting the style attribute required f…
ramonjd f1b9240
Regenerating fixtures after the trim fix in https://github.com/WordPr…
ramonjd 40ddfc1
Ensure that child elements inherit their colors from the figure element
ramonjd 9f2eca6
All deprecation migration functions, where their corresponding save f…
ramonjd 6a5d751
Since we've introduced block support for border and background color,…
ramonjd 6d3491d
Regenerating main color deprecation fixtures after #33502
ramonjd db08851
Fix after rebase
ramonjd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Since we've introduced block support for border and background color,…
… the default and solid block styles were, aside from the text alignment, redundant. So we have removed them. To compensate for the alignment, this commit adds a text alignment block control. Deprecated blocks will still have the `is-style-solid-class`, so we keep the styles targeting it, and also ensure that we set the new attribute `textAlign` to "left" when it's present. Add specificity to the left and right text align styles so that the block alignment controls have a great chance of overriding theme styles.
- Loading branch information
commit 6a5d751908dda8630e334a66fd99b00fca000607
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/e2e-tests/fixtures/blocks/core__pullquote__custom-colors.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| <!-- wp:pullquote {"style":{"color":{"background":"#3486aa","text":"#ffefef"},"border":{"color":"#045679"}},"className":"is-style-default"} --> | ||
| <figure class="wp-block-pullquote is-style-default has-border-color has-text-color has-background" style="background-color:#3486aa;border-color:#045679;color:#ffefef"><blockquote><p>pullquote</p><cite>citation</cite></blockquote></figure> | ||
| <!-- wp:pullquote {"textAlign":"right","style":{"color":{"background":"#3486aa","text":"#ffefef"},"border":{"color":"#045679"}},"className":"is-style-default"} --> | ||
| <figure class="wp-block-pullquote is-style-default has-border-color has-text-align-right has-text-color has-background" style="background-color:#3486aa;border-color:#045679;color:#ffefef"><blockquote><p>pullquote</p><cite>citation</cite></blockquote></figure> | ||
| <!-- /wp:pullquote --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/e2e-tests/fixtures/blocks/core__pullquote__custom-colors.serialized.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| <!-- wp:pullquote {"className":"is-style-default","style":{"color":{"background":"#3486aa","text":"#ffefef"},"border":{"color":"#045679"}}} --> | ||
| <figure class="wp-block-pullquote is-style-default has-border-color has-text-color has-background" style="background-color:#3486aa;border-color:#045679;color:#ffefef"><blockquote><p>pullquote</p><cite>citation</cite></blockquote></figure> | ||
| <!-- wp:pullquote {"textAlign":"right","className":"is-style-default","style":{"color":{"background":"#3486aa","text":"#ffefef"},"border":{"color":"#045679"}}} --> | ||
| <figure class="wp-block-pullquote has-text-align-right is-style-default has-border-color has-text-color has-background" style="background-color:#3486aa;border-color:#045679;color:#ffefef"><blockquote><p>pullquote</p><cite>citation</cite></blockquote></figure> | ||
| <!-- /wp:pullquote --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/e2e-tests/fixtures/blocks/core__pullquote__deprecated-4.serialized.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| <!-- wp:pullquote {"className":"has-background has-black-background-color is-style-solid-color","backgroundColor":"black","textColor":"white"} --> | ||
| <figure class="wp-block-pullquote has-background has-black-background-color is-style-solid-color has-white-color has-black-background-color has-text-color has-background"><blockquote><p>pullquote</p><cite>before block supports</cite></blockquote></figure> | ||
| <!-- wp:pullquote {"textAlign":"left","className":"has-background has-black-background-color is-style-solid-color","backgroundColor":"black","textColor":"white"} --> | ||
| <figure class="wp-block-pullquote has-text-align-left has-background has-black-background-color is-style-solid-color has-white-color has-black-background-color has-text-color has-background"><blockquote><p>pullquote</p><cite>before block supports</cite></blockquote></figure> | ||
| <!-- /wp:pullquote --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.