Skip to content

Admin UI: Update Page background color#76548

Merged
CGastrell merged 3 commits into
WordPress:trunkfrom
CGastrell:fix/page-background-color
Mar 26, 2026
Merged

Admin UI: Update Page background color#76548
CGastrell merged 3 commits into
WordPress:trunkfrom
CGastrell:fix/page-background-color

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

@CGastrell CGastrell commented Mar 16, 2026

See design convo #76709

Part of #76448

What?

Updates the Page component background color from --wpds-color-bg-surface-neutral-strong (#ffffff) to --wpds-color-bg-surface-neutral (#f8f8f8), giving the page a subtle off-white background instead of pure white.

Before:
image

After:

image

Why?

As discussed in #76448, the page background should not be pure white. The design token currently resolves to #f8f8f8; a separate effort to update the token value to #fcfcfc is being tracked independently.

How?

Single token swap in packages/admin-ui/src/page/style.scss. The header retains --wpds-color-bg-surface-neutral-strong (white) for visual separation.

Testing Instructions

  1. Open any admin page that uses the Page component
  2. Verify the page background is slightly off-white (#f8f8f8) instead of pure white
  3. Verify the header remains white

NOTE: since this PR branches out from #76467 test can be done by running npm run storybook:dev and checking the Page component

Keyboard Testing

No keyboard-specific changes.


This PR depends on #76467 for Storybook stories.
Part of #76448.

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 16, 2026

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: CGastrell <cgastrell@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: simison <simison@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

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

@github-actions github-actions Bot added the [Package] Private APIs /packages/private-apis label Mar 16, 2026
@ciampo ciampo requested review from a team March 16, 2026 19:01
@ciampo ciampo added the [Type] Enhancement A suggestion for improvement. label Mar 16, 2026
@simison
Copy link
Copy Markdown
Member

simison commented Mar 17, 2026

Odd, but when I build this locally and rebasing with the latest trunk, I still get #fff for Fonts and Connectors pages:

Screenshot 2026-03-17 at 15 11 25

@ciampo
Copy link
Copy Markdown
Contributor

ciampo commented Mar 17, 2026

Odd, but when I build this locally and rebasing with the latest trunk, I still get #fff for Fonts and Connectors pages:

Does --wpds-color-bg-surface-neutral resolve to #fff in those cases? Are those pages wrapped in a ThemeProvider with dedicated background color settings?

@simison
Copy link
Copy Markdown
Member

simison commented Mar 17, 2026

@ciampo I don't think they're wrapped in ThemeProvider:

<Page title={ __( 'Fonts' ) }>

Variable resolves to #fff indeed.

@ciampo
Copy link
Copy Markdown
Contributor

ciampo commented Mar 17, 2026

I can see a ThemeProvider wrapping .boot-layout__stage in your screenshot

Screenshot 2026-03-17 at 14 33 34

Which is likely the cause for the --wpds-color-bg-surface-neutral value changing from its default.

From a quick search, I can see in fact two places in the @wordpress/boot package where there's a ThemeProvider that sets the color.bg prop to #ffffff:

<div className="boot-layout__surfaces">
<UserThemeProvider color={ { bg: '#ffffff' } }>
<Outlet />

<div className="boot-layout__surfaces">
<UserThemeProvider color={ { bg: '#ffffff' } }>
<Outlet />

So things are working as expected (the ThemeProvider overrides the default background color from #f8f8f8 to #fff). Beyond that, I don't have much context to understand why and if those theme settings are correct.

@jameskoster
Copy link
Copy Markdown
Contributor

@CGastrell how does this change manifest in the Site Editor (Appearance → Editor)? I'm guessing the Styles section is affected.

@simison
Copy link
Copy Markdown
Member

simison commented Mar 17, 2026

@jameskoster I'm assuming we could go ahead with the background color coming from component instead and remove the fixed #fff, but possibly better done in a follow-up as they'll likely need some other design changes to at least Fonts and Connectors pages?

@CGastrell CGastrell force-pushed the fix/page-background-color branch 2 times, most recently from 2a2b05a to 46d5752 Compare March 17, 2026 17:59
@github-actions github-actions Bot removed the [Package] Private APIs /packages/private-apis label Mar 17, 2026
Copy link
Copy Markdown
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

Nothing to note, code-wise. I'll let y'all decide whether you want to go ahead with this, also in the light of the fact that the actual background color is dictated by parent ThemeProvider instances.

@jameskoster
Copy link
Copy Markdown
Contributor

@simison I was mostly concerned about any unintentional affects in the site editor or other existing pages. I think the DataViews pages will be fine since DataViews itself sets a background color. But the Styles page doesn't, so I assume that will look different, and we'd need to apply a background to something like .global-styles-ui-sidebar__navigator-provider if we wanted to maintain the current appearance. The Fonts page would potentially be affected too?

I think the change is fine, I'm just not sure we should be updating the visual design of existing pages. That might be better handled separately?

@fabiankaegy
Copy link
Copy Markdown
Member

I'm surprised to see this. As far as I was aware, we were trying to move the opposite direction in core itself to align with the rest of the site editor etc and use white as the background.

Lots of elements such as notices etc don't look good on the off white backdrop.

@jameskoster
Copy link
Copy Markdown
Contributor

My understanding is that for the wider admin redesign we want content within the page to be contained in an element that has a lighter (white) background, e.g. a Card or a DataView, but that the page background itself should have slightly darker luminance. See this story as a crude example.

@simison
Copy link
Copy Markdown
Member

simison commented Mar 19, 2026

@fabiankaegy, like @jameskoster notes, in practise most current pages end up fully white. Full-width DataViews is a good example, and editors are another.

On settings pages with Cards, which Connectors and Fonts are likely best current examples, we should make them look "less flat," where everything is just white at the same "level". That's best done in separate PRs.

@simison simison added the [Package] Admin UI /packages/admin-ui label Mar 19, 2026
@jameskoster
Copy link
Copy Markdown
Contributor

On this PR the Styles section (Appearance -> Editor -> Styles) is changed in a way that may not be desirable as it diverges from the Styles panel in the full screen editor. We should either find alignment on that (may delay the PR), or add a style to ensure it remains the same as on trunk. See a comparison below:

Trunk This PR
Screenshot 2026-03-19 at 16 25 22 Screenshot 2026-03-19 at 16 25 00

@CGastrell
Copy link
Copy Markdown
Contributor Author

On this PR the Styles section (Appearance -> Editor -> Styles) is changed in a way that may not be desirable as it diverges from the Styles panel in the full screen editor. We should either find alignment on that (may delay the PR), or add a style to ensure it remains the same as on trunk. See a comparison below:

Wouldn't you say what's needed there is that the action items/menus surfaces need to stand out? Meaning, it's not the BG color that's wrong, it should be the actionable surfaces that need visual contrast/raising.

BTW, can't open those files, they seem to have come from some private user content. I can see the thumbnails on your response, but can't open full size.

@jameskoster
Copy link
Copy Markdown
Contributor

Wouldn't you say what's needed there is that the action items/menus surfaces need to stand out? Meaning, it's not the BG color that's wrong, it should be the actionable surfaces that need visual contrast/raising.

Arguably yes, but that decision needs broader design input. It’s not something we should resolve within the scope of this PR. For now I think it would be simpler to align stylistically with trunk then revisit this detail later.

@CGastrell CGastrell force-pushed the fix/page-background-color branch from 46d5752 to 997a3cc Compare March 19, 2026 18:48
@jasmussen
Copy link
Copy Markdown
Contributor

I agree with Jay, as-is this can't land with a white page header and gray page background. But that doesn't mean this becomes indefinitely blocked. The thing to solve for is agree on our surfaces and their properties, and past exercises have suggested that "the frame" is a single surface. That means it has a single color. So this mostly needs a decision: are pages gray in background, or white?

I recognize that #76448 provides a visual argument for why the frame has two surfaces, the page header being one that floats on top of it. But for the same reasons as Fabian suggests, this hasn't been the direction the core project has moved. So that split is hard for me to support, even though I very much appreciate the PR here.

But is it possible to find agreement on a single color for both? Can we simply adopt a shade of gray rather than white, for the frame surface as a whole? IMO if it's the right one, we absolutely can. The following is a different shade of gray of an older unrelated sketch, but it also features a frame surface as well as settings page componentry, and with high enough contrast to feel intentional.

image

@jameskoster
Copy link
Copy Markdown
Contributor

But is it possible to find agreement on a single color for both?

My understanding is that is the preferred direction—matching Page + Header background (--wpds-color-bg-surface-neutral).

retrofox added a commit that referenced this pull request Mar 20, 2026
avoids invisible icon background when rendered
on Page surfaces after #76548
retrofox added a commit that referenced this pull request Mar 20, 2026
* add EmptyState component to @wordpress/ui

compound component with Root, Visual, Icon, Title, Description, Actions

* add EmptyState unit tests

* add EmptyState stories

* align EmptyState with @wordpress/ui conventions

remove docblock comments, use semantic CSS tokens

* fix code review feedback on EmptyState component

use _Icon import convention, remove CSS var() spacing

* use neutral-weak bg for EmptyState icon

avoids invisible icon background when rendered
on Page surfaces after #76548

* move max-width to EmptyState root with token

replaces hardcoded 350px on description with
--wpds-dimension-surface-width-sm on container

* use Text component for EmptyState title and description

delegates typography styles to Text variants instead
of manual font-size/weight/line-height declarations
@CGastrell
Copy link
Copy Markdown
Contributor Author

These are all fine arguments and, as a visual refinement/decision, I think there's no actual rush, some of the scopes might be currently out of my reach. I keep wondering though, if this value is something that can be set up from ThemeProvider, the scope of the consensus can stick only to the "default" value context, hence we're not forcing or twisting things per se, but merely set how things look "out of the box".

@jameskoster
Copy link
Copy Markdown
Contributor

@CGastrell I think the concern is that this PR indirectly changes the design of an existing feature in an unintentional way. Ideally that should be discussed in a dedicated issue/PR. So I think the action item is just to maintain the existing background color, with a TODO to revisit later. WDYT?

CGastrell and others added 2 commits March 25, 2026 12:33
Use --wpds-color-bg-surface-neutral instead of
--wpds-color-bg-surface-neutral-strong for the Page background,
giving it a subtle off-white instead of pure white.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the existing --wpds-color-bg-surface-neutral-strong value to
avoid unintentional design changes to existing pages (e.g. Styles).
The lighter background can be revisited once those pages handle the
contrast change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell CGastrell force-pushed the fix/page-background-color branch from 997a3cc to 54abdac Compare March 25, 2026 15:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell
Copy link
Copy Markdown
Contributor Author

CGastrell commented Mar 25, 2026

@CGastrell I think the concern is that this PR indirectly changes the design of an existing feature in an unintentional way. Ideally that should be discussed in a dedicated issue/PR. So I think the action item is just to maintain the existing background color, with a TODO to revisit later. WDYT?

Sounds good. I just left a TODO comment there with a (self referencing) link to this PR for more context. Thanks!

While this turns the PR into a no-op, it's good to have a reminder there with some context.

@CGastrell CGastrell merged commit 4d1a025 into WordPress:trunk Mar 26, 2026
39 checks passed
@github-actions github-actions Bot added this to the Gutenberg 22.9 milestone Mar 26, 2026
@jameskoster
Copy link
Copy Markdown
Contributor

@CGastrell I think you mis-interpreted my message, apologies for not being clearer.

We should apply the change we want at the component level, IE update .admin-ui-page to consume --wpds-color-bg-surface-neutral for its background. Additional to that we should add a separate style to ensure the Styles section in the editor (and any other existing consumers of Page—I didn't test them all) is not affected by the component change. We can then revisit section-by-section in dedicated PRs. I hope that makes sense and apologies again for the lack of clarity.

adamsilverstein pushed a commit that referenced this pull request Mar 31, 2026
* add EmptyState component to @wordpress/ui

compound component with Root, Visual, Icon, Title, Description, Actions

* add EmptyState unit tests

* add EmptyState stories

* align EmptyState with @wordpress/ui conventions

remove docblock comments, use semantic CSS tokens

* fix code review feedback on EmptyState component

use _Icon import convention, remove CSS var() spacing

* use neutral-weak bg for EmptyState icon

avoids invisible icon background when rendered
on Page surfaces after #76548

* move max-width to EmptyState root with token

replaces hardcoded 350px on description with
--wpds-dimension-surface-width-sm on container

* use Text component for EmptyState title and description

delegates typography styles to Text variants instead
of manual font-size/weight/line-height declarations
adamsilverstein pushed a commit that referenced this pull request Mar 31, 2026
* Admin UI: Update Page background color to use neutral surface token

Use --wpds-color-bg-surface-neutral instead of
--wpds-color-bg-surface-neutral-strong for the Page background,
giving it a subtle off-white instead of pure white.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert page background color change, add TODO to revisit

Keep the existing --wpds-color-bg-surface-neutral-strong value to
avoid unintentional design changes to existing pages (e.g. Styles).
The lighter background can be revisited once those pages handle the
contrast change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add PR reference to TODO comment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
adamsilverstein pushed a commit that referenced this pull request Apr 7, 2026
* add EmptyState component to @wordpress/ui

compound component with Root, Visual, Icon, Title, Description, Actions

* add EmptyState unit tests

* add EmptyState stories

* align EmptyState with @wordpress/ui conventions

remove docblock comments, use semantic CSS tokens

* fix code review feedback on EmptyState component

use _Icon import convention, remove CSS var() spacing

* use neutral-weak bg for EmptyState icon

avoids invisible icon background when rendered
on Page surfaces after #76548

* move max-width to EmptyState root with token

replaces hardcoded 350px on description with
--wpds-dimension-surface-width-sm on container

* use Text component for EmptyState title and description

delegates typography styles to Text variants instead
of manual font-size/weight/line-height declarations
adamsilverstein pushed a commit that referenced this pull request Apr 7, 2026
* Admin UI: Update Page background color to use neutral surface token

Use --wpds-color-bg-surface-neutral instead of
--wpds-color-bg-surface-neutral-strong for the Page background,
giving it a subtle off-white instead of pure white.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert page background color change, add TODO to revisit

Keep the existing --wpds-color-bg-surface-neutral-strong value to
avoid unintentional design changes to existing pages (e.g. Styles).
The lighter background can be revisited once those pages handle the
contrast change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add PR reference to TODO comment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Admin UI /packages/admin-ui [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants