diff --git a/__snapshots__/select/component/chromium/DBSelect-should-match-screenshot.png b/__snapshots__/select/component/chromium/DBSelect-should-match-screenshot.png index d94b7f462e67..910887a2e2b6 100644 Binary files a/__snapshots__/select/component/chromium/DBSelect-should-match-screenshot.png and b/__snapshots__/select/component/chromium/DBSelect-should-match-screenshot.png differ diff --git a/__snapshots__/select/component/mobile-chrome/DBSelect-should-match-screenshot.png b/__snapshots__/select/component/mobile-chrome/DBSelect-should-match-screenshot.png index d94b7f462e67..910887a2e2b6 100644 Binary files a/__snapshots__/select/component/mobile-chrome/DBSelect-should-match-screenshot.png and b/__snapshots__/select/component/mobile-chrome/DBSelect-should-match-screenshot.png differ diff --git a/__snapshots__/select/patternhub/select-overview-should-match-screenshot.png b/__snapshots__/select/patternhub/select-overview-should-match-screenshot.png index 51218b4c3302..0d573842fcc1 100644 Binary files a/__snapshots__/select/patternhub/select-overview-should-match-screenshot.png and b/__snapshots__/select/patternhub/select-overview-should-match-screenshot.png differ diff --git a/__snapshots__/select/showcase/chromium-highContrast/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png b/__snapshots__/select/showcase/chromium-highContrast/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png index 4622f941b87f..4e004f8a538a 100644 Binary files a/__snapshots__/select/showcase/chromium-highContrast/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png and b/__snapshots__/select/showcase/chromium-highContrast/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png differ diff --git a/__snapshots__/select/showcase/chromium/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png b/__snapshots__/select/showcase/chromium/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png index 2eab09288e44..a05498357852 100644 Binary files a/__snapshots__/select/showcase/chromium/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png and b/__snapshots__/select/showcase/chromium/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png differ diff --git a/__snapshots__/select/showcase/mobile-chrome/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png b/__snapshots__/select/showcase/mobile-chrome/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png index 382a497bea1d..92a2d6af7224 100644 Binary files a/__snapshots__/select/showcase/mobile-chrome/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png and b/__snapshots__/select/showcase/mobile-chrome/DBSelect-should-match-screenshot-1/DBSelect-should-match-screenshot.png differ diff --git a/packages/components/src/components/select/select.scss b/packages/components/src/components/select/select.scss index 76e1fcfcb05f..6bbb53511446 100644 --- a/packages/components/src/components/select/select.scss +++ b/packages/components/src/components/select/select.scss @@ -45,4 +45,41 @@ display: none; } } + + // enable customized styling + @supports (appearance: base-select) { + select, + /* stylelint-disable-next-line selector-pseudo-element-no-unknown */ + ::picker(select) { + /* stylelint-disable-next-line declaration-property-value-no-unknown */ + appearance: base-select; + } + + /* stylelint-disable-next-line selector-pseudo-element-no-unknown */ + &::picker-icon { + display: none; + } + + /* stylelint-disable-next-line selector-pseudo-element-no-unknown */ + :is(::picker(select)) { + @extend %default-card; + } + + option { + justify-content: space-between; + // change order of the included text and pseudo-element within this flexbox item, to make sure the icon is always on the right + flex-direction: row-reverse; + + &:checked { + font-weight: 700; + } + + /* stylelint-disable-next-line selector-pseudo-element-no-unknown */ + :is(&::checkmark) { + @extend %icon; + + @include icons.icon-content("check"); + } + } + } } diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBSelect-default-1.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBSelect-default-1.txt index 1fbca4312ef8..1b6cd237623f 100644 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBSelect-default-1.txt +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBSelect-default-1.txt @@ -1 +1 @@ -["Label, combo box, collapsed, (Default) Regular","expanded","Option 1. list. Option 1, not selected, 1 of 3","Option 2, not selected, 2 of 3"] \ No newline at end of file +["Label, combo box, collapsed, (Default) Regular","","expanded. list. Option 1, not selected, 1 of 3","Option 2, not selected, 2 of 3"]