Open zpericic opened 1 year ago
Block specific styles are not serialized completely if block is not one of core plugins eg. name starting with "core/".
As result global styles are broken and non-core could only be styled one-by-one or via external CSS.
This is regression after #50310.
I have made PR #52228 which shortly address this issue.
Install custom block which:
Apply some global styles on your custom block for button, link or h[1-6].
theme.json example:
{ "styles": { "blocks": { "some/block": { "color": { "background": "black", "text": "white" }, "elements": { "link": { "color": { "text": "red" } } } } }, "elements": { "color": { "background": "white", "text": "black" }, "link": { "color": { "text": "blue" } } } } }
Result:
<style id='global-styles-inline-css'> body{... .wp-block-some-block{color: white; background-color: black;} ... </style>
Expected result:
<style id='global-styles-inline-css'> body{... .wp-block-some-block{color: white; background-color: black;} .wp-block-some-block a:where(:not(.wp-element-button)){color: red;} ... </style>
No response
Versions:
Yes
This is resolved in Wordpress by 4174 and merged in Trac 56254.
Error still persist if guttenberg is active.
Are these issues duplicates? https://github.com/WordPress/gutenberg/issues/46454
Description
Block specific styles are not serialized completely if block is not one of core plugins eg. name starting with "core/".
As result global styles are broken and non-core could only be styled one-by-one or via external CSS.
This is regression after #50310.
I have made PR #52228 which shortly address this issue.
Step-by-step reproduction instructions
Install custom block which:
Apply some global styles on your custom block for button, link or h[1-6].
theme.json example:
Result:
Expected result:
Screenshots, screen recording, code snippet
No response
Environment info
Versions:
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes