From 048b31176bb06d1c5d151891e4001b32cdd6c30d Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:20:38 +0900 Subject: [PATCH] Site Editor Sidebar: Hide horizontal scrollbar when navigating (#63194) * Site Editor Sidebar: Hide horizontal scrollbar when navigating * Add `contain: content` and comment Co-authored-by: t-hamano Co-authored-by: jsnajdr --- packages/edit-site/src/components/sidebar/style.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/edit-site/src/components/sidebar/style.scss b/packages/edit-site/src/components/sidebar/style.scss index 0b411e31806641..d2f3e450cca133 100644 --- a/packages/edit-site/src/components/sidebar/style.scss +++ b/packages/edit-site/src/components/sidebar/style.scss @@ -1,6 +1,12 @@ .edit-site-sidebar__content { flex-grow: 1; overflow-y: auto; + // Prevents horizontal overflow while animating screen transitions + overflow-x: hidden; + // Mark this section of the DOM as isolated, providing performance benefits + // by limiting calculations of layout, style and paint to a DOM subtree rather + // than the entire page. + contain: content; } @keyframes local--slide-from-right {