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

Unable to add presets with same slug as default preset via theme.json #59893

Open
madhusudhand opened this issue Mar 15, 2024 · 0 comments
Open
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended

Comments

@madhusudhand
Copy link
Contributor

Description

Are default presets such as colors, shadows immutable? Should they?

When default presets are enabled, adding a new preset (color or shadow) with the same slug as default preset, it neither adds it to the theme presets, nor overrides the default preset.

image

Note: slug black is given value red for testing

image

Where as when default presets are disabled, it allows to add with same slug.
image

It is also the same case for other presets.
Are the default presets (core presets) immutable by design?

Step-by-step reproduction instructions

Add a new color or shadow preset with same slug in theme.json.
Observe that the new value (theme preset) isn't available for use.

Screenshots, screen recording, code snippet

No response

Environment info

  • Wordpress 6.4
  • Gutenberg trunk

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

@madhusudhand madhusudhand added the [Type] Bug An existing feature does not function as intended label Mar 15, 2024
@jordesign jordesign added the [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended
2 participants