Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/wp-admin/css/colors/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@

body {
background: variables.$body-background;

--wp-admin-color-base: #{variables.$base-color};
--wp-admin-color-text: #{variables.$text-color};
--wp-admin-color-icon: #{variables.$icon-color};
--wp-admin-color-highlight: #{variables.$highlight-color};
--wp-admin-color-highlight--rgb: #{color.red(variables.$highlight-color)}, #{color.green(variables.$highlight-color)}, #{color.blue(variables.$highlight-color)};
--wp-admin-color-highlight-darker-10: #{color.adjust(variables.$highlight-color, $lightness: -5%)};
--wp-admin-color-highlight-darker-10--rgb: #{color.red(color.adjust(variables.$highlight-color, $lightness: -5%))}, #{color.green(color.adjust(variables.$highlight-color, $lightness: -5%))}, #{color.blue(color.adjust(variables.$highlight-color, $lightness: -5%))};
--wp-admin-color-highlight-darker-20: #{color.adjust(variables.$highlight-color, $lightness: -10%)};
--wp-admin-color-highlight-darker-20--rgb: #{color.red(color.adjust(variables.$highlight-color, $lightness: -10%))}, #{color.green(color.adjust(variables.$highlight-color, $lightness: -10%))}, #{color.blue(color.adjust(variables.$highlight-color, $lightness: -10%))};
--wp-admin-color-notification: #{variables.$notification-color};
--wp-admin-color-body-background: #{variables.$body-background};
--wp-admin-color-link: #{variables.$link};
--wp-admin-color-menu-background: #{variables.$menu-background};
--wp-admin-color-menu-text: #{variables.$menu-text};
--wp-admin-color-menu-icon: #{variables.$menu-icon};
--wp-admin-color-menu-highlight-text: #{variables.$menu-highlight-text};
--wp-admin-color-menu-highlight-icon: #{variables.$menu-highlight-icon};
--wp-admin-color-menu-highlight-background: #{variables.$menu-highlight-background};
--wp-admin-color-menu-submenu-text: #{variables.$menu-submenu-text};
--wp-admin-color-menu-submenu-background: #{variables.$menu-submenu-background};
--wp-admin-color-menu-submenu-focus-text: #{variables.$menu-submenu-focus-text};
--wp-admin-color-menu-bubble-text: #{variables.$menu-bubble-text};
--wp-admin-color-menu-bubble-background: #{variables.$menu-bubble-background};
--wp-admin-color-menu-collapse-text: #{variables.$menu-collapse-text};
--wp-admin-color-menu-collapse-icon: #{variables.$menu-collapse-icon};
--wp-admin-color-menu-collapse-focus-icon: #{variables.$menu-collapse-focus-icon};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too much, and will prevent us from making any meaningful change to the profiles in the future, basically we'll be stuck with these variables forever. I'd rather avoid introducing new CSS variables if possible, or introduce the minimum possible (only the one we need right now)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think we will be stuck with these variables forever? In WP, just about everything is forever, and all those variables in the respective admin scheme scss are going to prevail forever.

So why not expose them all at once and have the capacity of using them for our convenience in GB? How are they going to hinder us?

Do you mean that since they will be publicly exposed, extenders could start using them, locking us in? Isn't the plan to simply support the current color schemes?

Anyway, I would leave at least the basic ones.

	--wp-admin-color-base: #{variables.$base-color};
	--wp-admin-color-text: #{variables.$text-color};
	--wp-admin-color-icon: #{variables.$icon-color};
	--wp-admin-color-highlight: #{variables.$highlight-color};

With this exposed, we could even consider refactoring the mixins base styles, since there won't really be any more need to duplicate the colors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think we will be stuck with these variables forever? In WP, just about everything is forever, and all those variables in the respective admin scheme scss are going to prevail forever

Right now these are sass variables, so not public APIs, CSS variables on the other side are public APIs.

Copy link
Member Author

@SirLouen SirLouen Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is what I mean. You are taking into account that if we open them we will be stuck to them forever. Anyway I'm wondering what is the proposal for the Theme provider instead. Because colors are predefined already, and for now we are duplicating them which is not ideal either.

}


Expand Down