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

Duplicated theme & user styles #30563

Closed
oandregal opened this issue Apr 7, 2021 · 2 comments
Closed

Duplicated theme & user styles #30563

oandregal opened this issue Apr 7, 2021 · 2 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

@oandregal
Copy link
Member

Reported at #29985 (comment)

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 oandregal 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 7, 2021
@Sandstromer
Copy link

Sandstromer commented Apr 7, 2021

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?

@oandregal
Copy link
Member Author

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

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

2 participants