diff --git a/changelog/fix-9636-custom-select-control-styling b/changelog/fix-9636-custom-select-control-styling new file mode 100644 index 00000000000..a6ff4559ef7 --- /dev/null +++ b/changelog/fix-9636-custom-select-control-styling @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix compatibility issues with CustomSelectControl component styles for WordPress 6.7 diff --git a/client/components/custom-select-control/style.scss b/client/components/custom-select-control/style.scss index 3fb1b113f20..fee99ea689a 100644 --- a/client/components/custom-select-control/style.scss +++ b/client/components/custom-select-control/style.scss @@ -1,6 +1,7 @@ .wcpay.components-custom-select-control { font-size: 13px; color: $gray-900; + position: relative; .components-custom-select-control__label { display: inline-block; @@ -12,12 +13,22 @@ margin: 0; line-height: initial; box-shadow: inset 0 1px 0 #f0f0f0; + align-items: center; + cursor: default; + display: grid; + grid-template-columns: auto auto; + list-style-type: none; &.is-highlighted { background: $gray-0; } } + .components-custom-select-control__item + .components-custom-select-control__item-icon { + margin-left: auto; + } + button.components-custom-select-control__button { width: 100%; background-color: #fff; @@ -53,9 +64,22 @@ } } + .components-custom-select-control__menu[aria-hidden='true'] { + display: none; + } + .components-custom-select-control__menu { margin: -1px 1px; - border-color: $gray-300; + background-color: #fff; + border: 1px solid $gray-300; + border-radius: 2px; max-height: 300px; + min-width: 100%; + outline: none; + overflow: auto; + padding: 0; + position: absolute; + transition: none; + z-index: 1000000; } }