Editor Always applies Color( with same color values but diff slug and name )declared first irrespective of Color applied #58492
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
Needs Testing
Needs further testing to be confirmed.
[Status] Stale
Gives the original author opportunity to update before closing. Can be reopened as needed.
[Type] Bug
An existing feature does not function as intended
Description
If Theme have declared two colors with same color value but different slug and name
for ex :
{ "color": "#ffffff", "name": "Text 1", "slug": "text-2" }, { "color": "#ffffff", "name": "Text 2", "slug": "text-1" },
Then if in editor a text 2 color is selected, still the editor will apply text-1.
This will cause issues when styles are changed. What if the colors values change in style declarations ? I also remember patterns will also have styles option in coming future, it will cause issues then
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
The text was updated successfully, but these errors were encountered: