Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duotone using theme/Style colors does not update when theme/Style colors are changed #49595

Open
jordesign opened this issue Apr 4, 2023 · 4 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@jordesign
Copy link
Contributor

Description

What I expect

When a duotone filter is using the theme's preset colors (eg. Contrast/Primary/Secondary set from Global Styles) I expect the duotone to update when I make changes to the color presets.

What happens

Instead when changing the preset colors - the duotone filter retains the old colors and shows them as hex values instead of the preset name.

Step-by-step reproduction instructions

  1. Set up an image/cover block with the Duotone Filter. For the highlight and shadow values - select preset colors.
  2. Change the preset colors in Site Editor > Styles > Colors
  3. Return to the image/cover block and see that the duotone filter has not updated.

Screenshots, screen recording, code snippet

duotone-color-palette.mov

Environment info

  • WP6.2 & GB15.4
  • TwentyTwentyThree

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@jordesign jordesign added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 4, 2023
@jordesign
Copy link
Contributor Author

For additional context it seems that is related to the Duotone values being stores as hex instead of CSS variables.
Related issue here - but specifically related to Style variations:
#46547

And more related to the Social Icons block:
#35480
#36462

There's also an existing PR for switching to CSS Custom properties for Duotone
#42870

@jordesign
Copy link
Contributor Author

more additional context....

I ran into this issue when trying to create a Block Pattern for submission. The use case being that it would be great to have a pattern be inserted and have the Duotone automatically reference the user's preset colors when inserted.

@annezazu
Copy link
Contributor

annezazu commented Apr 5, 2023

@MaggieCabrera and @ajlende curious what you all think here!

@MaggieCabrera
Copy link
Contributor

Yeah, I believe it's because are saved as hex, when that gets solved we should check that this issue gets resolved as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants