Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions projects/js-packages/base-styles/admin-page-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,29 @@ $jp-breakpoint-mobile: 782px;
// ── <AdminPage> root ──────────────────────────────────────────────
// Neutralize the legacy -20px shift and make AdminPage a flex child
// that fills its parent column.

// `overflow: visible` is enforced here because consumers that drop a
// className with `overflow-x: hidden` on the <AdminPage> root (e.g. to
// clip a stray horizontal overflow) would silently turn `.jp-admin-page`
// into a scroll container: any unspecified `overflow-y: visible` on the
// same element gets promoted to `overflow-y: auto` by the browser when
// the other axis is `hidden`/`scroll`/`clip`. With `.jp-admin-page` as
// a scroll container, wheel events past the inner middle's end propagate
// to it and the entire page (header + middle + footer) shifts up under
// the fixed `#wpbody-content`, exposing blank space below the footer.
// The intended scroll surface is the inner middle (defined further
// down); the inner middle clips horizontal overflow with `overflow:
// auto` already, and `#wpbody-content` is the ultimate `overflow:
// hidden` boundary, so consumer-side horizontal clipping isn't needed
// at this level.
.jp-admin-page {
margin-left: 0;
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-height: 0;
min-width: 0;
overflow: visible;
}

// ── admin-ui Page internals ───────────────────────────────────────
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

admin-page-layout mixin: explicitly set `overflow: visible` on `.jp-admin-page` so consumers that drop a className with `overflow-x: hidden` on the `<AdminPage>` root don't silently turn it into a scroll container (browsers promote unset `overflow-y: visible` to `auto` when the other axis is `hidden`/`scroll`/`clip`, which would shift the entire page under the fixed `#wpbody-content` once the inner middle reaches its scroll end).
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;

.my-jetpack-screen {
overflow-x: hidden;

:global(.jp-admin-page-header) {
padding-inline: 0.5rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

My Jetpack: drop `overflow-x: hidden` on the `<AdminPage>` root. The rule was a vestigial guard against the old `100vw` breakouts (since restructured) and silently turned `.jp-admin-page` into a scroll container — when the inner middle reached its end, wheel events propagated up and shifted the entire page (header + middle + footer) under the fixed `#wpbody-content`, exposing blank space below the footer.
Loading