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

Incorrect color for interactive elements with Gutenberg 15.8 #167

Closed
adamwoodnz opened this issue May 19, 2023 · 6 comments · May be fixed by #184
Closed

Incorrect color for interactive elements with Gutenberg 15.8 #167

adamwoodnz opened this issue May 19, 2023 · 6 comments · May be fixed by #184
Assignees
Labels
bug Something isn't working priority: medium ui Related to user interface
Milestone

Comments

@adamwoodnz
Copy link
Contributor

adamwoodnz commented May 19, 2023

--wp-admin-theme-color seems to have changed to blueberry, and all the elements using it now don't match the rest of the UI

Screen Shot 2023-05-19 at 12 01 57 PM

Screen Shot 2023-05-19 at 12 05 43 PM

@adamwoodnz adamwoodnz added bug Something isn't working ui Related to user interface labels May 19, 2023
@adamwoodnz adamwoodnz added this to the MVP milestone May 19, 2023
@adamwoodnz adamwoodnz self-assigned this May 19, 2023
@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented May 19, 2023

It seems this might be related to style loading order. Prod styles are inline, whereas local is not and the plugin styles are loading before Gutenberg (even though wp-components is listed as a dependency), so that might be the cause. Need to check sandbox with Gutenberg 5.8

@adamwoodnz
Copy link
Contributor Author

This PR looks to be the cause

@StevenDufresne StevenDufresne removed this from the MVP milestone Jun 1, 2023
@StevenDufresne
Copy link
Contributor

@adamwoodnz What needs to be done here?

@iandunn iandunn added this to the Iteration 1 milestone Jun 1, 2023
@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented Jun 2, 2023

@adamwoodnz What needs to be done here?

I'm undecided on the way forward. It only seems to affect local dev, where the wp-component styles load after the block styles, even though they are supposed to be a dependency. This doesn't happen in production (not using 15.8 yet) or sandbox. That seems like it might be a Gutenberg bug, or a bug with our setup, but I haven't found an existing Gutenberg issue.

As such the recommended fix in this PR doesn't work, as the var still gets overridden.

Only the @wordpress/components has had this change to the --wp-admin-theme-color var committed so far, but I imagine others might follow, so the problem might become more widespread.

So we could ignore it locally, but it would affect any styling work we're doing.

Another option which I tried successfully was overriding the var but scoped to only our components, so that we don't affect the global header or footer, for example. Something like:

.wp-block-wporg-two-factor-settings {
	--wp-admin-theme-color: #007cba;
}

Seems a reasonable workaround, thoughts?

@StevenDufresne
Copy link
Contributor

I would be tempted to leave it alone although I'm not sure if support will get an update in the redesign. I imagine it will.

@adamwoodnz
Copy link
Contributor Author

Closing due to low impact and low priority. We can reopen if needed.

@adamwoodnz adamwoodnz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: medium ui Related to user interface
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants