wp-blocks / vinyl

Audio player block for WordPress.
Other
3 stars 0 forks source link

Support custom colors #11

Closed johnhooks closed 5 months ago

johnhooks commented 5 months ago

Problem

The default look of the audio player is very basic.

Solution

Add block editor controls to customize the colors of the audio player.

The default should be the theme colors, with the ability to override with a custom selection. They should be global attributes for the player blocks, and used site wide.

Possible issues

The media-chrome library uses custom properties for most customizations. This makes it tricky to use the default blocks supports for color, because they are assigned as background and color styles on the block itself, and we need to assign them to custom properties.

Todo

Relates to #10

johnhooks commented 5 months ago

It looks like backgroundColor and textColor are added to the block attributes if not present, though could be use to create custom properties.

src/wp-includes/block-supports/colors.php