Skip to content

Cannot create custom gradients when no gradients are set in theme.json #37114

@ndiego

Description

@ndiego

Description

If you set coreGradients: false (soon to be defaultGradients: false), customGradients: true, but no specified gradients are set in theme.json, the UI for creating custom gradients is not displayed.

image

Step-by-step reproduction instructions

  1. Install the latest version of Twenty Twenty-Two and make sure you are using Gutenberg 12.0.1.

  2. In theme.json remove the gradients and set coreGradients: false and customGradients: true like the following.
    image

  3. Navigate the Block Editor and add a Cover block. Click on the Color panel, switch to Gradients and see the UI in the screenshot above.

Note: It actually does not appear the customGradients: true really does anything anymore. Toggling on and off seems to have no effect.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 5.9 Beta 1 and Gutenberg 12.0.1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] ColorsColor management[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions