Skip to content

Social Icons: Preset colors do not stay in sync with Global Styles presets #35480

@kjellr

Description

@kjellr

When you assign a preset color to the Social Links block, it records the preset's hex color in the markup like so:

<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"#000000"} -->

If someone were to go and modify the value of that foreground preset via Global Styles, the social links block does not update to the new color value. The original hex color defined in the block markup is still used.

GIF:

Note that I'm changing the color of "foreground" via Global Styles, but that update is not reflected in the Social Links block color:

social-links-color


Gutenberg version 11.7.0-rc.1
Noticed during the development of Twenty Twenty-Two: WordPress/twentytwentytwo#74 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] SocialAffects the Social Block - used to display Social Media accounts[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