File tree Expand file tree Collapse file tree
packages/edit-site/src/components/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,10 +184,18 @@ function Layout() {
184184 }
185185 />
186186 ) }
187- < SidebarContent routeKey = { routeKey } >
188- { areas . mobileContent ? (
189- < ThemeProvider
190- color = { CONTENT_COLOR }
187+ { areas . mobileContent ? (
188+ /*
189+ * ThemeProvider wraps SidebarContent (rather than
190+ * just the content) so the scroll wrapper it renders
191+ * inherits the content background tokens. See
192+ * `.edit-site-sidebar__screen-wrapper` in style.scss.
193+ */
194+ < ThemeProvider
195+ color = { CONTENT_COLOR }
196+ >
197+ < SidebarContent
198+ routeKey = { routeKey }
191199 >
192200 < div className = "edit-site-layout__mobile-content" >
193201 < ErrorBoundary >
@@ -196,13 +204,17 @@ function Layout() {
196204 }
197205 </ ErrorBoundary >
198206 </ div >
199- </ ThemeProvider >
200- ) : (
207+ </ SidebarContent >
208+ </ ThemeProvider >
209+ ) : (
210+ < SidebarContent
211+ routeKey = { routeKey }
212+ >
201213 < ErrorBoundary >
202214 { areas . mobileSidebar }
203215 </ ErrorBoundary >
204- ) }
205- </ SidebarContent >
216+ </ SidebarContent >
217+ ) }
206218 < SaveHub />
207219 < SavePanel />
208220 </ >
Original file line number Diff line number Diff line change 8484 display : flex ;
8585 flex-direction : column ;
8686 flex-grow : 1 ;
87+ }
88+
89+ // On mobile, the content surface lives on the scroll wrapper
90+ // (not the inner content element) so it also covers the wrapper's
91+ // reserved scrollbar gutter, preventing the theme background color from
92+ // bleeding through.
93+ .edit-site-sidebar__screen-wrapper :has (.edit-site-layout__mobile-content ) {
8794 background : var (--wpds-color-bg-surface-neutral );
8895}
8996
You can’t perform that action at this time.
0 commit comments