Skip to content
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 unable to redefine default colors, e.g. black and white #37225

Closed
Andrew-Starr opened this issue Dec 8, 2021 · 1 comment
Closed

Theme unable to redefine default colors, e.g. black and white #37225

Andrew-Starr opened this issue Dec 8, 2021 · 1 comment

Comments

@Andrew-Starr
Copy link

Description

If we want to remove the default colors, we can do so with settings.color.defaultPalette : false in the theme.json

But, if we want to still have access to the black or white colors for example by including these in the theme's color palette, they are not available as of #36811

I don't quite understand the reasoning behind blocking themes from defining colors with the same slug as a default color, if the theme is removing the default palette. Black and white are elementary basic colors that a theme may want to use, whilst at the same time not using the other default core colors.

Now if we want to include a black or white color, we have to give it a different slug, but we shouldn't have to do this as it will lead to confusion.

Step-by-step reproduction instructions

Remove the default core color palette, and add a black color to the theme color palette, for example:

"settings": {
		"color": {
			"defaultPalette": false,
			"palette": [
				{ "slug": "black", "name": "Black", "color": "#000000" }

Edit a post or global styles and notice the black color is not available for selection, even though the theme is defining it.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg 12.1.0

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

@Andrew-Starr
Copy link
Author

Never mind, I found this will be addressed in #37008

So easy to miss issues/PRs when searching! Will close this as not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant