gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Duplicated theme & user styles

Open oandregal opened this issue 5 years ago • 2 comments

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 #28303d to #28303e
  • Save the changes.
  • Go to the front-end and inspect the global-styles-inline-css embedded stylesheet.

The expected result is that:

  • there should be only one definition of --wp--preset--color--dark-gray whose 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:

oandregal avatar Apr 07 '21 12:04 oandregal

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?

Sandstromer avatar Apr 07 '21 12:04 Sandstromer

Closing this one and it's no longer an issue.

oandregal avatar Jul 13 '21 15:07 oandregal