Skip to content

Commit

Permalink
Fix ComboBox quiet readonly styling and SearchField padding right spe…
Browse files Browse the repository at this point in the history
…cificity (#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
  • Loading branch information
LFDanLu committed Aug 6, 2024
1 parent 3691c7f commit aa9f32d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*/
Expand Down Expand Up @@ -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));
}
}

1 comment on commit aa9f32d

@rspbot
Copy link

@rspbot rspbot commented on aa9f32d Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.