From cc9c5ebdb2ff86b0dbe53f91e24270c826f016f8 Mon Sep 17 00:00:00 2001 From: Trevor Burnham Date: Sat, 11 Jul 2026 17:11:16 -0400 Subject: [PATCH] fix: Prevent HelpPanel content from clipping at drawer bottom edge HelpPanel reserved its bottom whitespace as margin-block-end on its last child. A descendant's block-end margin is not added to an ancestor scroll container's scrollable region, so when the panel renders inside a fixed-height, scrollable app-layout drawer, the trailing margin was clipped and content sat flush against the bottom edge. Reserve the space as padding-block-end on the panel root instead, which is included in the scroll extent and renders consistently across all app-layout drawer implementations. --- src/help-panel/styles.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/help-panel/styles.scss b/src/help-panel/styles.scss index 191eeb2323..f763b5a1f0 100644 --- a/src/help-panel/styles.scss +++ b/src/help-panel/styles.scss @@ -10,7 +10,12 @@ @include styles.styles-reset; word-wrap: break-word; padding-block-start: awsui.$space-panel-header-vertical; - padding-block-end: 0; + // Reserve the bottom whitespace as padding on the panel root rather than as a + // margin on the last child. A descendant's block-end margin is not added to an + // ancestor scroll container's scrollable region, so when the panel is rendered + // inside a fixed-height, scrollable app-layout drawer the trailing margin gets + // clipped and the content sits flush against the bottom edge. + padding-block-end: awsui.$space-panel-content-bottom; /* stylelint-disable @cloudscape-design/no-implicit-descendant, selector-max-type */ hr { @@ -81,11 +86,6 @@ margin-block-start: awsui.$space-xl; color: awsui.$color-text-heading-default; } - // sets padding at the bottom of the panel - & > :last-child { - margin-block-end: awsui.$space-panel-content-bottom; - } - // add basic font-sizes p { color: inherit;