gutenberg
gutenberg copied to clipboard
Duplicated theme & user styles
Reported at https://github.com/WordPress/gutenberg/issues/29985#issuecomment-814817906
How to reproduce
- Use the TT1-blocks theme and go to the site editor.
- In the global styles sidebar, go to the "root" panel and change the "Dark Gray" color from
#28303dto#28303e - Save the changes.
- Go to the front-end and inspect the
global-styles-inline-cssembedded stylesheet.
The expected result is that:
- there should be only one definition of
--wp--preset--color--dark-graywhose value should be#28303e. - there should be only one preset class for
.has-dark-gray-color.
What happens instead is that there are two definitions (theme & user data), as per:

Can I add that would it also be better if the .has-dark-gray-color used the variable rather than the explicit color?
So, .has-dark-gray-color {color: #28303e;} should use .has-dark-gray-color {color: var(--wp--preset--color--dark-gray);} instead?
Closing this one and it's no longer an issue.