From eebd0759727048047bdb18d22975ce84d2911e15 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 2 Dec 2026 15:40:29 +0100 Subject: [PATCH 1/3] Admin UI: Share the content background seed for ThemeProvider Export `ADMIN_CONTENT_BACKGROUND` from `@wordpress/admin-ui` and use it for the content providers in the site editor and boot. Seed the boot root provider with it as well, so portaled UI in the extensible site editor matches the site editor. Co-Authored-By: Claude Opus 5.5 --- packages/admin-ui/CHANGELOG.md | 4 ++++ packages/admin-ui/README.md | 4 ++++ packages/admin-ui/src/admin-theme-colors/index.ts | 8 ++++++++ packages/admin-ui/src/index.ts | 5 ++++- packages/boot/CHANGELOG.md | 1 + packages/boot/src/components/root/content-color.ts | 10 ++++++---- packages/boot/src/components/root/index.tsx | 2 +- packages/boot/src/components/root/single-page.tsx | 2 +- packages/edit-site/src/components/layout/index.jsx | 8 ++++++-- 9 files changed, 35 insertions(+), 9 deletions(-) diff --git a/packages/admin-ui/CHANGELOG.md b/packages/admin-ui/CHANGELOG.md index 1c9e19fc1ebc69..6ec968a75411a1 100644 --- a/packages/admin-ui/CHANGELOG.md +++ b/packages/admin-ui/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### New Features + +- Add `ADMIN_CONTENT_BACKGROUND`, the background color that seeds a `ThemeProvider` for the content area of an admin app ([#XXXXX](https://github.com/WordPress/gutenberg/pull/XXXXX)). + ## 3.3.0 (2026-12-02) ### Bug Fixes diff --git a/packages/admin-ui/README.md b/packages/admin-ui/README.md index acc6b15810eb08..0f2c24aed63e89 100644 --- a/packages/admin-ui/README.md +++ b/packages/admin-ui/README.md @@ -39,6 +39,10 @@ RTL versions of the stylesheets are available in the same paths, but with `-rtl` +### ADMIN_CONTENT_BACKGROUND + +Background color that seeds a `ThemeProvider` (`color.background`) for the light content area of an admin app, and for UI that belongs to it, such as portaled popovers and modals. It matches the `ThemeProvider` default background seed. + ### Breadcrumbs Renders a breadcrumb navigation trail. diff --git a/packages/admin-ui/src/admin-theme-colors/index.ts b/packages/admin-ui/src/admin-theme-colors/index.ts index 7ca5691413a3b0..8cbd3d2d5d9506 100644 --- a/packages/admin-ui/src/admin-theme-colors/index.ts +++ b/packages/admin-ui/src/admin-theme-colors/index.ts @@ -37,6 +37,14 @@ export const ADMIN_THEME_COLORS = new Map< string, AdminThemeColors >( [ [ 'light', { primary: '#007cba', background: '#eaeeed' } ], ] ); +/** + * Background color that seeds a `ThemeProvider` (`color.background`) for the + * light content area of an admin app, and for UI that belongs to it, such as + * portaled popovers and modals. It matches the `ThemeProvider` default + * background seed. + */ +export const ADMIN_CONTENT_BACKGROUND = '#fcfcfc'; + /** * Reads the active WordPress admin color scheme from the `admin-color-*` body * class and returns its primary and background colors. Intended to seed a diff --git a/packages/admin-ui/src/index.ts b/packages/admin-ui/src/index.ts index 9067325544babd..97156879dd6867 100644 --- a/packages/admin-ui/src/index.ts +++ b/packages/admin-ui/src/index.ts @@ -1,4 +1,7 @@ export { default as Breadcrumbs } from './breadcrumbs'; export { default as NavigableRegion } from './navigable-region'; export { default as Page } from './page'; -export { getAdminThemeColors } from './admin-theme-colors'; +export { + ADMIN_CONTENT_BACKGROUND, + getAdminThemeColors, +} from './admin-theme-colors'; diff --git a/packages/boot/CHANGELOG.md b/packages/boot/CHANGELOG.md index 15414cc98af87c..a86a7986c3e5a1 100644 --- a/packages/boot/CHANGELOG.md +++ b/packages/boot/CHANGELOG.md @@ -6,6 +6,7 @@ - Snackbars use the content colors, so their focus ring stays readable over light content ([#87818](https://github.com/WordPress/gutenberg/pull/87818)). - Keep admin routes available when the site-data prefetch fails ([#86185](https://github.com/WordPress/gutenberg/pull/86185)). +- Portaled UI, such as modals, popovers, and dropdown menus, uses the content background color, as in the Site Editor ([#XXXXX](https://github.com/WordPress/gutenberg/pull/XXXXX)). ## 0.28.0 (2026-12-02) diff --git a/packages/boot/src/components/root/content-color.ts b/packages/boot/src/components/root/content-color.ts index 03a0754aa206f0..406977b45beadc 100644 --- a/packages/boot/src/components/root/content-color.ts +++ b/packages/boot/src/components/root/content-color.ts @@ -1,6 +1,8 @@ +import { ADMIN_CONTENT_BACKGROUND } from '@wordpress/admin-ui'; + /** - * Seeds the content surfaces, and the snackbars that float over them, with the - * default background color instead of the admin color scheme's. Nested - * providers inherit the admin scheme's primary color. + * Seeds the root provider, the content surfaces, and the snackbars that float + * over them with the content background color instead of the admin color + * scheme's. Nested providers inherit the admin scheme's primary color. */ -export const CONTENT_COLOR = { background: '#fcfcfc' }; +export const CONTENT_COLOR = { background: ADMIN_CONTENT_BACKGROUND }; diff --git a/packages/boot/src/components/root/index.tsx b/packages/boot/src/components/root/index.tsx index fc22277e779c16..c276b3c5eb9356 100644 --- a/packages/boot/src/components/root/index.tsx +++ b/packages/boot/src/components/root/index.tsx @@ -63,7 +63,7 @@ export default function Root() {
Date: Wed, 2 Dec 2026 15:41:31 +0100 Subject: [PATCH 2/3] Add the pull request number to the changelog entries Co-Authored-By: Claude Opus 5.5 --- packages/admin-ui/CHANGELOG.md | 2 +- packages/boot/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/admin-ui/CHANGELOG.md b/packages/admin-ui/CHANGELOG.md index 6ec968a75411a1..120c3446393add 100644 --- a/packages/admin-ui/CHANGELOG.md +++ b/packages/admin-ui/CHANGELOG.md @@ -4,7 +4,7 @@ ### New Features -- Add `ADMIN_CONTENT_BACKGROUND`, the background color that seeds a `ThemeProvider` for the content area of an admin app ([#XXXXX](https://github.com/WordPress/gutenberg/pull/XXXXX)). +- Add `ADMIN_CONTENT_BACKGROUND`, the background color that seeds a `ThemeProvider` for the content area of an admin app ([#87839](https://github.com/WordPress/gutenberg/pull/87839)). ## 3.3.0 (2026-12-02) diff --git a/packages/boot/CHANGELOG.md b/packages/boot/CHANGELOG.md index a86a7986c3e5a1..b366e2956d5ba0 100644 --- a/packages/boot/CHANGELOG.md +++ b/packages/boot/CHANGELOG.md @@ -6,7 +6,7 @@ - Snackbars use the content colors, so their focus ring stays readable over light content ([#87818](https://github.com/WordPress/gutenberg/pull/87818)). - Keep admin routes available when the site-data prefetch fails ([#86185](https://github.com/WordPress/gutenberg/pull/86185)). -- Portaled UI, such as modals, popovers, and dropdown menus, uses the content background color, as in the Site Editor ([#XXXXX](https://github.com/WordPress/gutenberg/pull/XXXXX)). +- Portaled UI, such as modals, popovers, and dropdown menus, uses the content background color, as in the Site Editor ([#87839](https://github.com/WordPress/gutenberg/pull/87839)). ## 0.28.0 (2026-12-02) From 06c40f6c21b0a86b4fa1f5288d6a07f91e7abb05 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Thu, 3 Dec 2026 11:42:31 +0100 Subject: [PATCH 3/3] Boot: Describe the portaled UI colors accurately in the changelog Co-Authored-By: Claude Opus 5.5 --- packages/boot/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/boot/CHANGELOG.md b/packages/boot/CHANGELOG.md index b366e2956d5ba0..7fe004f86607ae 100644 --- a/packages/boot/CHANGELOG.md +++ b/packages/boot/CHANGELOG.md @@ -6,7 +6,7 @@ - Snackbars use the content colors, so their focus ring stays readable over light content ([#87818](https://github.com/WordPress/gutenberg/pull/87818)). - Keep admin routes available when the site-data prefetch fails ([#86185](https://github.com/WordPress/gutenberg/pull/86185)). -- Portaled UI, such as modals, popovers, and dropdown menus, uses the content background color, as in the Site Editor ([#87839](https://github.com/WordPress/gutenberg/pull/87839)). +- Portaled UI, such as modals, popovers, and dropdown menus, uses the colors of the content area, as in the Site Editor ([#87839](https://github.com/WordPress/gutenberg/pull/87839)). ## 0.28.0 (2026-12-02)