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

Selecting a theme gradient doesn't update the gradient bar color #43715

Open
mirka opened this issue Aug 30, 2022 · 1 comment
Open

Selecting a theme gradient doesn't update the gradient bar color #43715

mirka opened this issue Aug 30, 2022 · 1 comment
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Comments

@mirka
Copy link
Member

mirka commented Aug 30, 2022

Clicking on a theme gradient doesn't update the gradient bar UI:

Selecting a theme gradient for the Cover block

The isolated instances in Storybook for the GradientPicker component are working fine, so there is likely something wrong with the data flow in the block editor usage.


Reported by @jasmussen

@mirka mirka added [Type] Bug An existing feature does not function as intended [Package] Block editor /packages/block-editor labels Aug 30, 2022
@luminuu
Copy link
Member

luminuu commented May 22, 2024

Upon searching for this behaviour I found this issue and can confirm it does happen when CSS variables are used. Twenty Twenty-Four uses hex codes in the gradients, while for example Twenty Twenty-Three in the Sherbet style variation, CSS variables are used. It is reproduceable there.

To reproduce, the use code like this in a gradient in theme.json:
linear-gradient(135deg,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--secondary) 100%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants