-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Theme's color palette no longer returned via Block Editor settings #32027
Comments
Context: My block relies on access to the theme's default colour scheme. If this is an intentional breaking change, I'd love if someone could help with a way to get the theme's default colours. |
@nosolosw Did we include a shim for these in the Core patch? |
Yeah, in core and Gutenberg 10.7 the Note, however, that since we landed #31669 the color palette includes both theme and core colors. Jorge has prepared a PR #32225 that will make the palette to only contain the theme colors. I've marked that PR as "fixing this issue". |
This has been fixed by #32358 |
Description
wp.data.select( 'core/block-editor' ).getSettings().colors
no longer returns theme colors.Step-by-step reproduction instructions
wp.data.select( 'core/block-editor' ).getSettings().colors
At this point, note the colours – they're the colours that your theme has defined.
Notice that the colours returned are NOT the theme colours, but default Editor colours
Expected behaviour
The Block Editor "colors" setting would return the color palette defined by the theme.
Actual behaviour
The Block Editor "colors" setting returns an array of default WordPress colours.
WordPress information
Device information
The text was updated successfully, but these errors were encountered: