From aa9f32d3cc2011a4d85564ca81a04d8b69ac3dad Mon Sep 17 00:00:00 2001 From: Daniel Lu Date: Tue, 6 Aug 2024 14:41:22 -0700 Subject: [PATCH] Fix ComboBox quiet readonly styling and SearchField padding right specificity (#6829) * fix Combobox quiet readonly style specificity makes the nonfocused style more specific so it wins over the disabled style but still doesnt win over the active style * make search field styles win over textfield styles * increase combobox invalid style specificity --- .../@adobe/spectrum-css-temp/components/inputgroup/skin.css | 4 ++-- packages/@adobe/spectrum-css-temp/components/search/index.css | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/@adobe/spectrum-css-temp/components/inputgroup/skin.css b/packages/@adobe/spectrum-css-temp/components/inputgroup/skin.css index 1152dcc6979..615e6c43b90 100644 --- a/packages/@adobe/spectrum-css-temp/components/inputgroup/skin.css +++ b/packages/@adobe/spectrum-css-temp/components/inputgroup/skin.css @@ -103,7 +103,7 @@ governing permissions and limitations under the License. specifically for readonly inputgroups that aren't disabled since the button will have the disabled class but we don't want the border color to be the disabled quiet one */ - &:not(.is-disabled) { + &:not(.is-disabled):not(.is-focused) { .spectrum-FieldButton { &:disabled:before, &:disabled:hover:before { @@ -148,7 +148,7 @@ governing permissions and limitations under the License. } } - &.spectrum-InputGroup { + &.spectrum-InputGroup.spectrum-InputGroup { &.spectrum-InputGroup--invalid { .spectrum-FieldButton:before, .spectrum-InputGroup-input { diff --git a/packages/@adobe/spectrum-css-temp/components/search/index.css b/packages/@adobe/spectrum-css-temp/components/search/index.css index 96346e12a49..669073bb811 100644 --- a/packages/@adobe/spectrum-css-temp/components/search/index.css +++ b/packages/@adobe/spectrum-css-temp/components/search/index.css @@ -65,7 +65,7 @@ governing permissions and limitations under the License. } } -.spectrum-Search-input { +.spectrum-Search-input.spectrum-Search-input { display: block; /* Correct the odd appearance of input[type="search"] in Chrome and Safari.*/ @@ -98,4 +98,3 @@ governing permissions and limitations under the License. padding-inline-end: calc(var(--spectrum-search-padding-right) + var(--spectrum-textfield-padding-x) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left)); } } -