Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/expandable-section/expandable-section-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,14 @@ const ExpandableHeaderTextWrapper = ({
{...(headerButtonListeners ? getExpandActionAnalyticsMetadataAttribute(expanded) : {})}
>
<span className={clsx(styles['icon-container'], styles[`icon-container-${variant}`])}>{icon}</span>
<span id={id} className={clsx(styles['header-text'], analyticsSelectors['header-label'])}>
<span
id={id}
className={clsx(
styles['header-text'],
analyticsSelectors['header-label'],
!expanded && !headerDescription && styles['not-expanded']
)}
>
{children}
</span>
</span>
Expand Down
26 changes: 14 additions & 12 deletions src/expandable-section/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
// Equal top and bottom padding so standalone header has vertical symmetry.
padding-block-end: awsui.$space-container-header-top;
}
&.header-deprecated {
padding-inline-start: container.$header-padding-horizontal;
}
&:not(.header-deprecated) {
padding-inline-start: calc(#{container.$header-padding-horizontal} + #{$icon-total-space-medium});
}
}
&.header-deprecated {
padding-inline-start: container.$header-padding-horizontal;
}
&:not(.header-deprecated) {
padding-inline-start: calc(#{container.$header-padding-horizontal} + #{$icon-total-space-medium});
}

@include focus-visible.when-visible {
// HACK: Remediate focus border
padding-block: calc(#{awsui.$space-scaled-s} - #{awsui.$border-divider-section-width});
padding-inline: calc(#{awsui.$space-l} - #{awsui.$border-divider-section-width});
}
@include focus-visible.when-visible {
// HACK: Remediate focus border
padding-block: calc(#{awsui.$space-scaled-s} - #{awsui.$border-divider-section-width});
padding-inline: calc(#{awsui.$space-l} - #{awsui.$border-divider-section-width});
}
}

Expand Down Expand Up @@ -228,7 +228,9 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
}

&-text {
/* used in test-utils */
&.not-expanded {
padding-block: awsui.$space-xxs;
}
}
}

Expand Down
Loading