From 43d19872b1abe3348f59ead968d1b22aa38cb9d9 Mon Sep 17 00:00:00 2001 From: at-susie Date: Fri, 19 Jan 2024 10:28:17 +0100 Subject: [PATCH] fix: update style condition to make the style adjustment happen only for full-page card (#1899) --- src/cards/index.tsx | 1 + src/cards/styles.scss | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cards/index.tsx b/src/cards/index.tsx index d022401a21..ed993791c1 100644 --- a/src/cards/index.tsx +++ b/src/cards/index.tsx @@ -172,6 +172,7 @@ const Cards = React.forwardRef(function ( className={clsx( hasToolsHeader && styles['has-header'], isRefresh && styles.refresh, + styles[`header-variant-${computedVariant}`], shouldRemoveHighContrastHeader && styles['remove-high-contrast-header'] )} > diff --git a/src/cards/styles.scss b/src/cards/styles.scss index 03665dd585..ca64f1bc10 100644 --- a/src/cards/styles.scss +++ b/src/cards/styles.scss @@ -89,8 +89,10 @@ // in order to use margin-bottom instead. margin-top: awsui.$space-grid-gutter; &.refresh { - &.remove-high-contrast-header { - margin-top: awsui.$space-scaled-s; + &.header-variant-full-page { + &.remove-high-contrast-header { + margin-top: awsui.$space-scaled-s; + } } } }