Skip to content
Merged
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
25 changes: 25 additions & 0 deletions src/expandable-section/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ $icon-offset-container: awsui.$space-xxs;
$icon-total-space-normal: calc(#{$icon-width-normal} + #{$icon-margin-left} + #{$icon-margin-right-normal});
$icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{$icon-margin-right-medium});

// Extra inline padding that widens the navigation caret pointer target to 24px (WCAG 2.5.8).
$nav-caret-pad-normal: calc(24px - #{$icon-width-normal});
$nav-caret-pad-one-theme: 12px; // 24px minus the one-theme x-small (12px) icon

.root {
@include styles.styles-reset;
@include styles.text-wrapping;
Expand Down Expand Up @@ -267,6 +271,27 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
text-decoration: none;
flex-direction: column;

// Widen the pointer target to 24px (WCAG 2.5.8) with inline padding and an
// equal negative margin: the extra width grows away from the header label
// into the adjacent gutter, so neither the glyph nor the label moves and
// the label link keeps its own clicks. Vertical size already fills the row.
&:not(.icon-container-end) {
padding-inline-start: $nav-caret-pad-normal;
margin-inline-start: calc(#{$icon-margin-left} - #{$nav-caret-pad-normal});
@include theming.one-theme-only {
padding-inline-start: $nav-caret-pad-one-theme;
margin-inline-start: calc(-1 * #{$nav-caret-pad-one-theme});
}
}
&.icon-container-end {
padding-inline-end: $nav-caret-pad-normal;
margin-inline-end: calc(-1 * #{$nav-caret-pad-normal});
@include theming.one-theme-only {
padding-inline-end: $nav-caret-pad-one-theme;
margin-inline-end: calc(-1 * #{$nav-caret-pad-one-theme});
}
}

&:hover {
color: awsui.$color-text-expandable-section-hover;
}
Expand Down
Loading