Skip to content

Comments

Support Forums: Fix --wp-admin-theme-color CSS variable scope#554

Closed
yani- wants to merge 1 commit intoWordPress:trunkfrom
yani-:fix/8175-admin-theme-color-scope
Closed

Support Forums: Fix --wp-admin-theme-color CSS variable scope#554
yani- wants to merge 1 commit intoWordPress:trunkfrom
yani-:fix/8175-admin-theme-color-scope

Conversation

@yani-
Copy link

@yani- yani- commented Feb 19, 2026

Closes: https://meta.trac.wordpress.org/ticket/8175

The --wp-admin-theme-color custom property is declared on :root referencing
var(--wp--preset--color--blueberry-1), but that variable is only defined on
body by WordPress core's global-styles-inline-css. Since :root (<html>)
is the parent of body, the referenced variable is not available in that scope.

This changes the declaration from :root to body so both variables are
defined on the same element and the reference resolves correctly.

Note: I used AI to generate the PR description and title. The source code has been reviewed and tested by me locally before opening this PR.

Change the declaration from :root to body so it resolves
var(--wp--preset--color--blueberry-1) which is defined on body
by global-styles-inline-css.

See https://meta.trac.wordpress.org/ticket/8175
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props yaniiliev.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@bazza bazza closed this in 6b16091 Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant