From 1074ec55cc9d7281bd6c8d2a59cbdd0175dd9fe2 Mon Sep 17 00:00:00 2001 From: Douglas Date: Fri, 22 May 2026 12:29:22 -0300 Subject: [PATCH] AdminPage: match header content row positionally for admin-ui 2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The consistent-header-height rule from #49080 still selected the page header via `> header`, but admin-ui 2.1 (#49018) renders it as a `
`, so the selector matched nothing and the tab strip began shifting again on admin-ui 2.1 consumers (Newsletter). Switch to `> :first-child`, matching the sibling header-normalization rules — it targets the header positionally and works for both admin-ui 2.0's `
` and 2.1's `
`. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../changelog/fix-admin-page-header-height-admin-ui-2-1 | 4 ++++ .../components/components/admin-page/style.module.scss | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 projects/js-packages/components/changelog/fix-admin-page-header-height-admin-ui-2-1 diff --git a/projects/js-packages/components/changelog/fix-admin-page-header-height-admin-ui-2-1 b/projects/js-packages/components/changelog/fix-admin-page-header-height-admin-ui-2-1 new file mode 100644 index 000000000000..079f21668eb9 --- /dev/null +++ b/projects/js-packages/components/changelog/fix-admin-page-header-height-admin-ui-2-1 @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +AdminPage: fix header-height tab-shift rule not matching after admin-ui 2.1 changed the page header element from header to div diff --git a/projects/js-packages/components/components/admin-page/style.module.scss b/projects/js-packages/components/components/admin-page/style.module.scss index 546f4d388ec7..e94eb9d9b81d 100644 --- a/projects/js-packages/components/components/admin-page/style.module.scss +++ b/projects/js-packages/components/components/admin-page/style.module.scss @@ -52,7 +52,9 @@ // row's items so a shorter control neither stretches nor collapses it. // The content row is identified by the visual logo slot it contains // (`aria-hidden="true"`), so a breadcrumbs-only header isn't affected. - :global(.jp-admin-page__page > header > div:has([aria-hidden="true"])) { + // `> :first-child` targets the page header positionally (a `
` in + // admin-ui ≥ 2.1, a `
` in 2.0) — matching the sibling rules above. + :global(.jp-admin-page__page > :first-child > div:has([aria-hidden="true"])) { min-height: 40px; align-items: center; }