Skip to content

Move Duotone "presets" blocks support data to dedicated duotone attribute. #48371

@getdave

Description

@getdave

As per discussion below let's store any duotone presets (not custom colors which will remain "as is" in the styles.colors.duotone) into a new, dedicated duotone attribute on the block.


Why do you think it would need deprecations or additional backwards compatibility code?

The way I see it, old blocks with the custom colors saved continue to work like they did before. Nothing here gets touched.

New blocks that select a preset have a new attribute that unsets the style.color.duotone attribute and sets the new duotone attribute.

I think that it should be this PR so that we don't have to deal with backwards compatibility when switching over to storing custom filters in style and presets in duotone.

Originally posted by @ajlende in #48318 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ColorsColor management[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions