Custom Gutenberg color classes naming convention

The default behavior for the gutenberg blocks with color pallet is:

The class name is built appending ‘has-‘, followed by the class name using kebab case and ending with the context name. https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#block-color-palettes

which make the color classes like has-blue-100-color has-black-background-color

What I am looking for is a way to change the default naming convention has-*-color

The reason is to make the blocks compatible with tailwindcss color naming - text-blue-100 bg-black

Topic block-editor color-picker css Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.