Repository navigation
Add separate support keys for color and background color - #25314
Merged
jorgefilipecosta merged 1 commit intoSep 15, 2020
Merged
jorgefilipecosta merged 1 commit into
jorgefilipecosta merged 1 commit into
Conversation
jorgefilipecosta
requested review from
ellatrix and
youknowriad
as code owners
September 14, 2020 18:34
|
Size Change: +62 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
youknowriad
reviewed
Sep 15, 2020
| colorSupport.gradient === true || | ||
| colorSupport.background !== false || | ||
| colorSupport.text !== false ) | ||
| ); |
Contributor
There was a problem hiding this comment.
The same checks exist on the backend too. color.php
Member
Author
There was a problem hiding this comment.
The file was updated 👍
jorgefilipecosta
force-pushed
the
add/separate-support-keys-for-color-and-background-color
branch
from
September 15, 2020 12:16
034b0b6 to
2860717
Compare
jorgefilipecosta
force-pushed
the
add/separate-support-keys-for-color-and-background-color
branch
from
September 15, 2020 16:03
2860717 to
cfa68c9
Compare
jorgefilipecosta
requested review from
TimothyBJacobs and
spacedmonkey
as code owners
September 15, 2020 16:03
youknowriad
approved these changes
Sep 15, 2020
youknowriad
left a comment
Contributor
There was a problem hiding this comment.
The code changes look good. I didn't test though.
aristath
approved these changes
Sep 15, 2020
jorgefilipecosta
deleted the
add/separate-support-keys-for-color-and-background-color
branch
September 15, 2020 20:10
Member
|
@jorgefilipecosta @youknowriad @aristath I just came across this when running into other things #26928 and wanted to document it #26931 I was wondering if you'd be open to make text & background work as the other properties of color -gradient, link- and also the other supports that have sub-properties (spacing). This has been only deemed stable for WordPress 5.6, so we're on time to fix it. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #24927
This PR allows blocks in block.json to support a text color a background-color, a gradient, and a link color individually.
Previously one could not have a background without text color for example.
By default background and text are assumed to be supported provided an __experimentalColor flag exists. But blocks can disable them using background:false or text:false respectively.
How has this been tested?
I changed the paragraph block.json to the following combinations and verified the result was always the expected one: