Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 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
1 change: 1 addition & 0 deletions packages/boot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Bug Fixes

- Seed content-surface `ThemeProvider` backgrounds with `#fcfcfc` instead of `#ffffff`, matching the design system default and preserving room for stronger and weaker neutral surface tokens ([#81646](https://github.com/WordPress/gutenberg/pull/81646)).
- Restore bottom-centered snackbar notices after the CSS Modules migration ([#81995](https://github.com/WordPress/gutenberg/pull/81995)).
- Mount the plugins registered with `registerPlugin`, so the sidebars, panels and menu items they fill render ([#81754](https://github.com/WordPress/gutenberg/pull/81754)).
- Canvas: Show the site's front end where a route names no entity and the theme has no block templates to resolve one from, instead of an editor with nothing open. Was previously handled by the home route alone, leaving `/identity` broken on a classic theme ([#81749](https://github.com/WordPress/gutenberg/pull/81749)).
Expand Down
3 changes: 2 additions & 1 deletion packages/boot/src/components/root/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ export default function Root() {
<ThemeProvider
color={ {
...themeColors,
background: '#ffffff',
// Reset to the default background color.
background: '#fcfcfc',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Now that we correct the theme background seed to the correct default for light mode, I'm seeing these kinds cases where the Page component is used with the assumption that the background would be pure white (but no longer is because the token is now correctly resolving to light gray):

Identity Styles Fonts

@ciampo @simison @retrofox Any preferences on how this should be handled? It can either be supported by the Page component itself, or handled by the consumer by setting its own background. These cases with DataViews is kind of already doing this:

Templates

This comment was marked as outdated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ciampo and I discussed this today, and decided that we'll escalate the Page problem to our designers this week.

Since that will take some time to reach a solution on, and the problem in this PR is something that should be fixed ASAP, I'll add local background colors for now so we can get this merged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In discussion with @jasmussen and @simison, we decided that a white background is valid as a pattern, and implementation-wise the consumer will be responsible for setting the background color on their own container if they want white.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How should (we recommend that) they do it?

An explicit prop on page to switch bg variants? Style overrides using the appropriate token? ThemeProvider with background seed color set to #fff?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What I understood from the discussion was that call sites are expected to put in their own content wrappers. In practice, that involved three CSS rules minimum, plus padding as desired by the use case. (See "white wrapper" changes in this PR.)

I think it's within the range of acceptable (ergonomics/consistency), at least in the near term. But I would still consider it a possibility that we support white backgrounds at the Page component level. That decision should be made separately from this PR, which should be merged ASAP.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rather than hard-code this to #fcfcfc, could we effectively unset it as an expression that we want it to follow the design system default?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, @ciampo and I have been considering this as a possible approach. Though, it isn't straightforward when you consider the dark mode case. Many possible ways to approach.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe extracting those values to local const called DEFAULT_BACKGROUND or something similar could be a first step without committing to API changes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added inline comments for clarity.

} }
>
<Outlet />
Expand Down
3 changes: 2 additions & 1 deletion packages/boot/src/components/root/single-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default function RootSinglePage() {
<ThemeProvider
color={ {
...themeColors,
background: '#ffffff',
// Reset to the default background color.
background: '#fcfcfc',
} }
>
<Outlet />
Expand Down
2 changes: 2 additions & 0 deletions packages/edit-site/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

### Internal

- Seed content-surface `ThemeProvider` backgrounds with `#fcfcfc` instead of `#ffffff`, matching the design system default and preserving room for stronger and weaker neutral surface tokens ([#81646](https://github.com/WordPress/gutenberg/pull/81646)).

- Stop rendering `EditorKeyboardShortcutsRegister`, which the editor provider now renders itself ([#81580](https://github.com/WordPress/gutenberg/pull/81580)).

### Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion packages/edit-site/src/components/layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const { useLocation } = unlock( routerPrivateApis );
const { useStyle, UploadProgressSnackbar } = unlock( editorPrivateApis );

const ANIMATION_DURATION = 0.3;
const CONTENT_COLOR = { background: '#ffffff' };
// Reset to the default background color.
const CONTENT_COLOR = { background: '#fcfcfc' };

function Layout() {
const { query, name: routeKey, areas, widths } = useLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ export default function SidebarGlobalStyles() {
title={ __( 'Styles' ) }
headingLevel={ 2 }
>
<GlobalStylesUIWrapper
path={ section }
onPathChange={ onChangeSection }
settings={ settings }
/>
<div className="edit-site-styles__content">
<GlobalStylesUIWrapper
path={ section }
onPathChange={ onChangeSection }
settings={ settings }
/>
</div>
</Page>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
}
}

.edit-site-styles__content {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Styles in the site editor.

Without wrapper With wrapper
Styles site editor without wrapper Styles site editor with wrapper

}

// Show button text labels when preference is enabled.
.show-icon-labels {
.edit-site-styles__header-actions {
Expand Down
20 changes: 9 additions & 11 deletions packages/edit-site/src/components/sidebar-identity/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,15 @@ export default function SidebarIdentity() {
};

return (
<Page
title={ _x( 'Identity', 'site identity' ) }
headingLevel={ 2 }
hasPadding
>
<DataForm
data={ data }
fields={ fields }
form={ form }
onChange={ onChange }
/>
<Page title={ _x( 'Identity', 'site identity' ) } headingLevel={ 2 }>
<div className="edit-site-sidebar-identity__form">
<DataForm
data={ data }
fields={ fields }
form={ form }
onChange={ onChange }
/>
</div>
</Page>
);
}
6 changes: 6 additions & 0 deletions packages/edit-site/src/components/sidebar-identity/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.edit-site-sidebar-identity__form {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Identity in the site editor.

Without wrapper With wrapper
Identity site editor without wrapper Identity site editor with wrapper

padding: var(--wpds-dimension-padding-lg) var(--wpds-dimension-padding-2xl);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure I understand why we removed hasPadding in favor of custom styles. Was it to flatten the DOM? It feels to me like it pierces the abstraction in a way that edit-site should not know about Page.

@aduth aduth Aug 28, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I suppose it's so that the padded part follows the background color 🤔 Abstraction piercing / duplicated source of truth concern still applies. Another thought is to allow Page to accept a prop to apply a class name to the content area, but that could be messy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is potentially a regression.

Removing hasPadding also removes the Page content wrapper, which supplies overflow: auto. Since the desktop content area clips overflow, we should probably add overflow: auto back to the styles, to keep scrolling so that lower Identity fields remain reachable when the form is taller than the pane

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Verified and fixed:

Before After
Identity before, Site Icon clipped Identity after, form scrolled to Site Icon

}
1 change: 1 addition & 0 deletions packages/edit-site/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@use "./components/resizable-frame/style.scss" as *;
@use "./components/pagination/style.scss" as *;
@use "./components/sidebar-global-styles/style.scss" as *;
@use "./components/sidebar-identity/style.scss" as *;

::view-transition-image-pair(root) {
isolation: auto;
Expand Down
60 changes: 31 additions & 29 deletions routes/font-list/stage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,35 +67,37 @@ function FontLibraryPage() {

return (
<Page title={ __( 'Fonts' ) } className="font-library-page">
<Tabs
selectedTabId={ activeTab }
onSelect={ ( tabId: string ) => setActiveTab( tabId ) }
>
<div className="font-library-page__tablist">
<Tabs.TabList>
{ tabs.map( ( { id, title } ) => (
<Tabs.Tab key={ id } tabId={ id }>
{ title }
</Tabs.Tab>
) ) }
</Tabs.TabList>
</div>
{ tabs.map( ( { id } ) => (
<Tabs.TabPanel
key={ id }
tabId={ id }
focusable={ false }
className="font-library-page__tab-panel"
>
<FontLibrary
value={ user }
baseValue={ base }
onChange={ setUser }
activeTab={ id }
/>
</Tabs.TabPanel>
) ) }
</Tabs>
<div className="font-library-page__content">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Previously, tab list and panel were direct flex children of Page.

The new content wrapper already occupies only the space below the Page header, but .font-library-page__tab-panel still uses calc(100% - 110px) for header plus tabs and calc(100% - 198px) for header, tabs, and footer.

In practical terms, this means that the header is now subtracted twice, leaving leaves about one header's worth of unused space and making the font list scroll sooner.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Verified and fixed:

Before After
Fonts before, tab panel 194px Fonts after, tab panel fills to footer

<Tabs
selectedTabId={ activeTab }
onSelect={ ( tabId: string ) => setActiveTab( tabId ) }
>
<div className="font-library-page__tablist">
<Tabs.TabList>
{ tabs.map( ( { id, title } ) => (
<Tabs.Tab key={ id } tabId={ id }>
{ title }
</Tabs.Tab>
) ) }
</Tabs.TabList>
</div>
{ tabs.map( ( { id } ) => (
<Tabs.TabPanel
key={ id }
tabId={ id }
focusable={ false }
className="font-library-page__tab-panel"
>
<FontLibrary
value={ user }
baseValue={ base }
onChange={ setUser }
activeTab={ id }
/>
</Tabs.TabPanel>
) ) }
</Tabs>
</div>
</Page>
);
}
Expand Down
6 changes: 6 additions & 0 deletions routes/font-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@use "@wordpress/base-styles/colors" as *;
@use "@wordpress/global-styles-ui/build-style/style.css" as *;

.font-library-page__content {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fonts.

Without wrapper With wrapper
Fonts without wrapper Fonts with wrapper

}

.font-library-page__tablist {
border-bottom: 1px solid $gray-100;
padding: 0 $grid-unit-30;
Expand Down
21 changes: 10 additions & 11 deletions routes/identity/stage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { MediaEdit } from '@wordpress/fields';
import { loadEditorAssets } from '@wordpress/lazy-editor';
import { useEffect, useState } from '@wordpress/element';
import { decodeEntities } from '@wordpress/html-entities';
import styles from './style.module.scss';

type SiteSettings = {
title?: string;
Expand Down Expand Up @@ -124,17 +125,15 @@ function Identity() {
};

return (
<Page
title={ _x( 'Identity', 'site identity' ) }
headingLevel={ 2 }
hasPadding
>
<DataForm
data={ data }
fields={ fields }
form={ form }
onChange={ onChange }
/>
<Page title={ _x( 'Identity', 'site identity' ) } headingLevel={ 2 }>
<div className={ styles.form }>
<DataForm
data={ data }
fields={ fields }
form={ form }
onChange={ onChange }
/>
</div>
</Page>
);
}
Expand Down
6 changes: 6 additions & 0 deletions routes/identity/style.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.form {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Identity in the extensible site editor.

Without wrapper With wrapper
Identity extensible site editor without wrapper Identity extensible site editor with wrapper

padding: var(--wpds-dimension-padding-lg) var(--wpds-dimension-padding-2xl);
}
2 changes: 1 addition & 1 deletion routes/identity/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"noEmit": true,
"emitDeclarationOnly": false,
"composite": false,
"types": []
"types": [ "style-imports" ]
},
"references": [
{ "path": "../../packages/admin-ui/tsconfig.build.json" },
Expand Down
1 change: 1 addition & 0 deletions routes/media-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
flex: 1;
min-height: 0;
overflow: hidden;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Media editor.

Without wrapper With wrapper
Media editor without wrapper Media editor with wrapper


// The page has no footer under the editor, so the body would otherwise
// run to the bottom edge. Scoped to the route: the modal has its own
Expand Down
6 changes: 4 additions & 2 deletions routes/navigation-edit/stage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { __ } from '@wordpress/i18n';
import { decodeEntities } from '@wordpress/html-entities';
import type { Post } from '@wordpress/core-data';
import NavigationMenuEditor from './editor';
import styles from './style.module.scss';

const NAVIGATION_POST_TYPE = 'wp_navigation';

Expand Down Expand Up @@ -51,9 +52,10 @@ function NavigationEditStage() {
] }
/>
}
hasPadding
>
<NavigationMenuEditor id={ navigationId } />
<div className={ styles.content }>
<NavigationMenuEditor id={ navigationId } />
</div>
</Page>
);
}
Expand Down
6 changes: 6 additions & 0 deletions routes/navigation-edit/style.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.content {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

@mirka mirka Aug 28, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Navigation edit in the extensible site editor.

Without wrapper With wrapper
Navigation edit without wrapper Navigation edit with wrapper

padding: var(--wpds-dimension-padding-lg) var(--wpds-dimension-padding-2xl);
}
12 changes: 7 additions & 5 deletions routes/styles/stage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ function Stage() {
: __( 'Styles' )
}
>
<GlobalStylesUIWrapper
path={ section }
onPathChange={ onChangeSection }
settings={ editorSettings }
/>
<div className="routes-styles__content">
<GlobalStylesUIWrapper
path={ section }
onPathChange={ onChangeSection }
settings={ editorSettings }
/>
</div>
{ isActivatePanelOpen && (
<Modal
title={ __( 'Activate' ) }
Expand Down
6 changes: 6 additions & 0 deletions routes/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
}
}

.routes-styles__content {
flex-grow: 1;
min-height: 0;
background-color: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Styles in the extensible site editor.

Without wrapper With wrapper
Styles extensible site editor without wrapper Styles extensible site editor with wrapper

}

2 changes: 1 addition & 1 deletion widgets/site-preview/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-sm);
border: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral-weak);
border-radius: var(--wpds-border-radius-lg);
background: var(--wpds-color-background-surface-neutral);
background: var(--wpds-color-background-surface-neutral-strong);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Url field

}

.url-favicon {
Expand Down
Loading