Repository navigation
chore: Update segmented control style for one-theme #5116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| @use 'segment' as seg; | ||
| @use 'sass:list' as list; | ||
| @use '../internal/styles/tokens' as awsui; | ||
| @use '../internal/styles/utils/theming' as theming; | ||
|
|
||
| @function repeatValue($value, $times) { | ||
| $result: (); | ||
|
|
@@ -43,6 +44,10 @@ | |
| gap: calc(#{seg.$segment-gap} * 2 - #{seg.$segment-divider-width}); | ||
| } | ||
|
|
||
| @include theming.one-theme-only { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this could be merged with the above
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! I've quickly looked into that, but I'm not sure if that works actually. |
||
| gap: #{seg.$one-theme-segment-gap}; | ||
| } | ||
|
|
||
| &:not(.grouped), | ||
| &.grouped-only { | ||
| @include styles.media-breakpoint-down(styles.$breakpoint-x-small) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What changed for this to be xxxs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many icons have inner padding within the 16×16 area. When these icons are placed in a segment with equal inline spacing, the spacing can appear uneven because the icon itself contains additional space.
A negative inset-inline-start is especially useful in VR, where segments have larger inline spacing, but the current value appears too large for One Theme.