From 98e0bef3ba946368dfc94edb7c532c0eff6def4d Mon Sep 17 00:00:00 2001 From: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:28:29 -0700 Subject: [PATCH 1/3] Restructure Select override selectors --- .../src/components/Select/Select.scss | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/polaris-react/src/components/Select/Select.scss b/polaris-react/src/components/Select/Select.scss index f19582af6d8..1e1f9f58442 100644 --- a/polaris-react/src/components/Select/Select.scss +++ b/polaris-react/src/components/Select/Select.scss @@ -13,24 +13,18 @@ display: none; } - #{$se23} & { - &:not(.disabled, .error) { - &:hover { - // stylelint-disable-next-line -- se23 - .Backdrop { - border-color: var(--p-color-border-input-hover); - } - } + #{$se23} &:not(.disabled), + #{$se23} &:not(.error) { + // stylelint-disable-next-line -- se23 overrides + &:hover .Backdrop { + border-color: var(--p-color-border-input-hover); + } - // stylelint-disable-next-line -- se23 - .Input:active { - // stylelint-disable-next-line -- se23 - ~ .Backdrop { - border: none; - box-shadow: var(--p-shadow-inset-md); - background-color: var(--p-color-bg-input-active-experimental); - } - } + // stylelint-disable-next-line -- se23 overrides + & .Input:active ~ .Backdrop { + border: none; + box-shadow: var(--p-shadow-inset-md); + background-color: var(--p-color-bg-input-active-experimental); } } } From 7ca01d1df19f5ed007ef062e58f72f3c0ce1f9c5 Mon Sep 17 00:00:00 2001 From: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Date: Wed, 28 Jun 2023 12:40:13 -0700 Subject: [PATCH 2/3] Update overrides to chain :not() pseudo-classes --- polaris-react/src/components/Select/Select.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/polaris-react/src/components/Select/Select.scss b/polaris-react/src/components/Select/Select.scss index 1e1f9f58442..2b48e440d51 100644 --- a/polaris-react/src/components/Select/Select.scss +++ b/polaris-react/src/components/Select/Select.scss @@ -13,8 +13,7 @@ display: none; } - #{$se23} &:not(.disabled), - #{$se23} &:not(.error) { + #{$se23} &:not(.disabled):not(.error) { // stylelint-disable-next-line -- se23 overrides &:hover .Backdrop { border-color: var(--p-color-border-input-hover); From f4789f817e6970934399ab7725e5a657e05a0d55 Mon Sep 17 00:00:00 2001 From: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Date: Wed, 28 Jun 2023 12:49:06 -0700 Subject: [PATCH 3/3] Add changeset entry and remove extraneous ampersand --- .changeset/gorgeous-singers-invent.md | 5 +++++ polaris-react/src/components/Select/Select.scss | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/gorgeous-singers-invent.md diff --git a/.changeset/gorgeous-singers-invent.md b/.changeset/gorgeous-singers-invent.md new file mode 100644 index 00000000000..29adcebee0e --- /dev/null +++ b/.changeset/gorgeous-singers-invent.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Restructured `Select` override selectors to patch Sass compilation issue diff --git a/polaris-react/src/components/Select/Select.scss b/polaris-react/src/components/Select/Select.scss index 2b48e440d51..0c62b7cba8d 100644 --- a/polaris-react/src/components/Select/Select.scss +++ b/polaris-react/src/components/Select/Select.scss @@ -20,7 +20,7 @@ } // stylelint-disable-next-line -- se23 overrides - & .Input:active ~ .Backdrop { + .Input:active ~ .Backdrop { border: none; box-shadow: var(--p-shadow-inset-md); background-color: var(--p-color-bg-input-active-experimental);