From ef2af48aa9959e59ce47943209a30dd548ad0abe Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Fri, 2 Aug 2019 14:19:15 -0400 Subject: [PATCH] Make all notice-list notices the same min-height. --- packages/components/src/notice/style.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/components/src/notice/style.scss b/packages/components/src/notice/style.scss index ad96505a1dae3..38c9a9ad3e4cb 100644 --- a/packages/components/src/notice/style.scss +++ b/packages/components/src/notice/style.scss @@ -64,8 +64,23 @@ max-width: 100vw; z-index: z-index(".components-notice-list"); + // Use different margin and line height here to ensure that these are + // the same height, regardless of whether or not they have action buttons. .components-notice__content { margin-top: 1em; margin-bottom: 1em; + line-height: $grid-size-large + ($grid-size-small * 1.5); + } + + // Move the dismiss button to account for the extra line height. + .components-notice__dismiss { + top: 2px; + } + + // Adjust button size/position to better fit with the new line height. + .components-notice__action.components-button { + margin-top: -3px; + margin-bottom: -3px; + height: $grid-size-large + ($grid-size-small / 2); } }