-
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
Non-core block styles defined in theme.json currently being filtered-out before rendering #41614
Comments
@jorgefilipecosta perhaps you have some insights here? I know André is out still! |
Hi @drwsmth,
And both "Share on Twitter Block" and the paragraph look as expected. Could you please share the minimal theme.json file where you are able to reproduce the issue? Thank you in advance! |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
This issue has not had any activity for a while and I cannot reproduce this either. I am going to close this but please feel free to reopen it if you can provide more details, @drwsmth. Thank you! |
Description
When adding block styles for non-core blocks in
theme.json
, I expect styles to populate in the editor and front-end in a similar fashion to core blocks.Seems that since #40185 was merged into Gutenberg 13.1, this is no longer happening — is this intended behaviour?
Step-by-step reproduction instructions
{"styles":{"blocks":{"tabor/share-on-twitter":{"color":{"background":"rebeccapurple","text":"white"},"border":{"radius":"10px"},"typography":{"fontSize":"2rem"}}}}}
{"styles":{"blocks":{"core/paragraph":{"color":{"text":"teal"},"typography":{"fontSize":"2rem"}}}}}
compat/wordpress-6.0/block-editor-settings.php
on line 85, remove the if-condition wrapping$styles_without_existing_global_styles[] = $style;
Screenshots, screen recording, code snippet
Before making the change listed above in
compat/wordpress-6.0/block-editor-settings.php
on line 85After making the change listed above in
compat/wordpress-6.0/block-editor-settings.php
on line 85Environment info
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
The text was updated successfully, but these errors were encountered: