Ensure that custom block element styles in theme.json are not ignored#4174
Closed
felixarntz wants to merge 6 commits into
Closed
Ensure that custom block element styles in theme.json are not ignored#4174felixarntz wants to merge 6 commits into
theme.json are not ignored#4174felixarntz wants to merge 6 commits into
Conversation
…both unit and integration.
Member
Author
|
@glendaviesnz @scruffian Would be great to get your reviews on this since you worked on the original code in WordPress/gutenberg#41446. I worked on test coverage first. Seeing them fail on 308066b but pass on d1dcd9d shows that the updated logic correctly fixes the underlying bug. |
oandregal
reviewed
Mar 6, 2023
spacedmonkey
reviewed
Mar 6, 2023
spacedmonkey
reviewed
Mar 6, 2023
|
This tested well for me. I added: "styles": {
"blocks": {
"core/quote": {
"elements": {
"cite": {
"color": {
"text": "blue",
"background": "yellow"
}
}
}
}
"coblocks/accordion": {
"elements": {
"h2": {
"color": {
"text": "red",
"background": "black"
}
}
}
}
and without this patch element styles for the core and custom block displayed in the editor, but only the core block element style showed in the frontend. With this patch applied both element styles displayed in the editor and frontend. Thanks for looking at this. |
costdev
reviewed
Jul 17, 2023
costdev
reviewed
Jul 17, 2023
costdev
reviewed
Jul 17, 2023
costdev
reviewed
Jul 17, 2023
costdev
reviewed
Jul 17, 2023
costdev
reviewed
Jul 17, 2023
costdev
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the updates @felixarntz! LGTM 👍
costdev
approved these changes
Jul 17, 2023
Member
Author
|
Committed in https://core.trac.wordpress.org/changeset/56254 |
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.
theme.jsonpath.wp_add_global_styles_for_blocks().Trac ticket: https://core.trac.wordpress.org/ticket/57868
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.