Skip to content

Site Editor: Fix admin color scheme bleeding through the mobile content scrollbar gutter#79056

Merged
fushar merged 2 commits into
trunkfrom
admin-bar-in-editor-bleed
Jun 10, 2026
Merged

Site Editor: Fix admin color scheme bleeding through the mobile content scrollbar gutter#79056
fushar merged 2 commits into
trunkfrom
admin-bar-in-editor-bleed

Conversation

@fushar

@fushar fushar commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What?

Fixes #78397 (comment)

Fixes the admin color scheme background bleeding through the white content panel, at the scrollbar location, in the mobile Site Editor layout (e.g. the Styles panel).

Why?

In the mobile layout, the content panel (areas.mobileContent) is rendered white via a ThemeProvider, but its scroll container (.edit-site-sidebar__screen-wrapper) is outside that theme and has no background of its own.

How?

The content panel's surface should be the scroll viewport, so the gutter is part of it. So, we move <ThemeProvider color={ CONTENT_COLOR }> up one level to wrap <SidebarContent>.

Testing Instructions

  1. Go to Appearance -> Editor
  2. Click Styles
  3. Go to dev tools and set the device viewport to a mobile one
  4. Observe the scrollbar gutter is clean (white), free from the color bleeding

Screenshots or screencast

Before After
image image

Use of AI Tools

I used Claude Opus 4.8 to help with the idea.

@github-actions github-actions Bot added the [Package] Edit Site /packages/edit-site label Jun 9, 2026
@fushar fushar requested review from aduth and ciampo June 9, 2026 14:53
@fushar fushar marked this pull request as ready for review June 9, 2026 14:54
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

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: fushar <fushar@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

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

@fushar fushar added the [Type] Bug An existing feature does not function as intended label Jun 9, 2026
@fushar fushar self-assigned this Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Size Change: +33 B (0%)

Total Size: 8.46 MB

📦 View Changed
Filename Size Change
build/scripts/edit-site/index.min.js 296 kB -3 B (0%)
build/styles/edit-site/style-rtl.css 22.1 kB +10 B (+0.05%)
build/styles/edit-site/style-rtl.min.css 18.2 kB +5 B (+0.03%)
build/styles/edit-site/style.css 22.1 kB +15 B (+0.07%)
build/styles/edit-site/style.min.css 18.2 kB +6 B (+0.03%)

compressed-size-action

@ciampo ciampo left a comment

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.

LGTM 🚀

flex-grow: 1;
}

.edit-site-sidebar__screen-wrapper:has(.edit-site-layout__mobile-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.

We could potentially add a CSS comment explaining the implicit contract that makes this work, ie. that the background lives on the wrapper (scrollbar gutter coverage) only for "mobile content" layouts, or something similar

<ThemeProvider
color={ CONTENT_COLOR }
{ areas.mobileContent ? (
<ThemeProvider

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.

It may also be worth adding an inline comment here explaining that ThemeProvider wraps SidebarContent so that its background tokens can be used on the outer wrapper to sover the scrollbar gutter

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Flaky tests detected in 2f0313c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27221756455
📝 Reported issues:

@fushar fushar merged commit 6c76206 into trunk Jun 10, 2026
40 checks passed
@fushar fushar deleted the admin-bar-in-editor-bleed branch June 10, 2026 03:16
@fushar

fushar commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@ciampo thanks for the review; I added comments and merged this!

@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants