Skip to content

Support for gradient presets #14

@Levdbas

Description

@Levdbas

Summary

Add the ability to fill the editor-gradient-presets in similar way as the color palette via this plugin.

Motivation

Having to manage your brand colors in once place instead of 2 is great! I use it every single day in my new gutenberg era way of work. As there is now gradient support in a very easy way in custom blocks I would love to see this supported by the pallete-webpack-plugin.

Additional context

Gradient presets also have three parts to be filled.

add_theme_support(
      'editor-gradient-presets',
      [
         [
            'name'     => Red to transparent,
            'gradient' => 'linear-gradient(180deg,#263e45 0,rgba(38,62,69,.8) 10%,rgba(38,62,69,0)',
            'slug'     => 'red-to-transparent',
         ],
      ]
   );

So i think the output function almost can be the same but then outputs to a gradients.json? I'd love to hear what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions