Skip to content

Commit 49345d5

Browse files
committed
feat(combobox): update to latest CSS
--- Co-authored-by: Marissa Huysentruyt <[email protected]>
1 parent ad3e3d6 commit 49345d5

File tree

6 files changed

+45
-5
lines changed

6 files changed

+45
-5
lines changed

.changeset/twelve-dragons-flash.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@spectrum-web-components/combobox': minor
3+
'@spectrum-web-components/styles': minor
4+
---
5+
6+
Styles updated to latest release, graduated from prerelease tag. For more details, please see the [Spectrum CSS Change log](https://github.com/adobe/spectrum-css/releases/tag/%40spectrum-css%2Fcombobox%404.1.2).
7+
8+
[#3609](https://redirect.github.com/adobe/spectrum-css/pull/3609) [851be13](https://github.com/adobe/spectrum-css/commit/851be13295f9d42d548894fee6626009f053de61) Thanks [@​marissahuysentruyt](https://github.com/marissahuysentruyt)!
9+
10+
### Fast follow fixes for combobox
11+
12+
- Corrects container query for the `--system` reference to "legacy" in the `combobox/themes/spectrum.css` file.
13+
- Corrects the border colors for several combobox states including `focus`, `keyboardFocus`, `focus` + `hover`, `disabled`, and `read-only` for all themes.
14+
- Adds `--spectrum-combobox-readonly-input-border-color: var(--spectrum-gray-400)` to the Express theme, so that the default border and read-only border colors are the same.

packages/combobox/src/combobox-overrides.css

+6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ governing permissions and limitations under the License.
2727
--spectrum-combobox-border-color-key-focus: var(
2828
--system-combobox-border-color-key-focus
2929
);
30+
--spectrum-combobox-readonly-input-border-color: var(
31+
--system-combobox-readonly-input-border-color
32+
);
3033
--spectrum-combobox-background-color-disabled: var(
3134
--system-combobox-background-color-disabled
3235
);
36+
--spectrum-combobox-border-color-disabled: var(
37+
--system-combobox-border-color-disabled
38+
);
3339
}

packages/combobox/src/spectrum-combobox.css

+17-5
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ governing permissions and limitations under the License.
118118
var(--spectrum-combobox-border-color-default)
119119
);
120120
--mod-textfield-border-color-disabled: var(
121-
--mod-combobox-border-color-disabled
121+
--mod-combobox-border-color-disabled,
122+
var(--spectrum-combobox-border-color-disabled)
122123
);
123124
--mod-textfield-border-color-focus: var(
124125
--mod-combobox-border-color-focus,
@@ -174,10 +175,13 @@ governing permissions and limitations under the License.
174175
--mod-picker-button-font-color-disabled: var(
175176
--mod-combobox-font-color-disabled
176177
);
178+
--mod-picker-button-border-color-disabled: var(
179+
--mod-combobox-border-color-disabled,
180+
var(--spectrum-combobox-border-color-disabled)
181+
);
177182
--spectrum-combobox-readonly-input-background-color: var(
178183
--spectrum-gray-50
179184
);
180-
--spectrum-combobox-readonly-input-border-color: var(--spectrum-gray-500);
181185
--spectrum-combobox-readonly-border-color-invalid-default: var(
182186
--spectrum-negative-border-color-default
183187
);
@@ -187,7 +191,7 @@ governing permissions and limitations under the License.
187191
--spectrum-combobox-readonly-text-color-disabled: var(
188192
--spectrum-disabled-content-color
189193
);
190-
--spectrum-combobox-border-color-disabled: var(
194+
--spectrum-combobox-readonly-border-color-disabled: var(
191195
--spectrum-disabled-border-color
192196
);
193197
}
@@ -332,6 +336,10 @@ governing permissions and limitations under the License.
332336
var(--mod-combobox-icon-size, var(--spectrum-combobox-icon-size)) /
333337
2
334338
);
339+
--mod-textfield-border-color-disabled: var(
340+
--mod-combobox-border-color-disabled,
341+
initial
342+
);
335343
--mod-picker-button-background-color-quiet: transparent;
336344
--mod-picker-button-border-color-quiet: transparent;
337345
}
@@ -439,14 +447,18 @@ governing permissions and limitations under the License.
439447
--mod-textfield-background-color-disabled,
440448
var(--spectrum-combobox-readonly-background-color-disabled)
441449
);
450+
border-color: #0000;
451+
border-color: var(
452+
--mod-combobox-readonly-border-color-disabled,
453+
var(--spectrum-combobox-readonly-border-color-disabled, transparent)
454+
);
442455
color: var(
443456
--highcontrast-textfield-text-color-disabled,
444457
var(
445458
--mod-textfield-text-color-disabled,
446459
var(--spectrum-combobox-readonly-text-color-disabled)
447460
)
448461
);
449-
border-color: #0000;
450462
}
451463

452464
.progress-circle {
@@ -874,7 +886,7 @@ governing permissions and limitations under the License.
874886
);
875887
border-color: var(
876888
--mod-textfield-border-color-disabled,
877-
var(--spectrum-combobox-border-color-disabled)
889+
var(--spectrum-combobox-readonly-border-color-disabled)
878890
);
879891
}
880892

tools/styles/tokens-v2/system-theme-bridge.css

+4
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,11 @@
15941594
--system-combobox-border-color-focus: var(--spectrum-gray-800);
15951595
--system-combobox-border-color-focus-hover: var(--spectrum-gray-900);
15961596
--system-combobox-border-color-key-focus: var(--spectrum-gray-800);
1597+
--system-combobox-readonly-input-border-color: var(--spectrum-gray-500);
15971598
--system-combobox-background-color-disabled: var(--spectrum-gray-25);
1599+
--system-combobox-border-color-disabled: var(
1600+
--spectrum-disabled-border-color
1601+
);
15981602
--system-dialog-fullscreen-header-text-size: 28px;
15991603
--system-dialog-min-inline-size: 288px;
16001604
--system-dialog-confirm-small-width: 400px;

tools/styles/tokens/express/system-theme-bridge.css

+2
Original file line numberDiff line numberDiff line change
@@ -1592,9 +1592,11 @@
15921592
--system-combobox-border-color-focus: var(--spectrum-gray-900);
15931593
--system-combobox-border-color-focus-hover: var(--spectrum-gray-800);
15941594
--system-combobox-border-color-key-focus: var(--spectrum-gray-900);
1595+
--system-combobox-readonly-input-border-color: var(--spectrum-gray-400);
15951596
--system-combobox-background-color-disabled: var(
15961597
--spectrum-disabled-background-color
15971598
);
1599+
--system-combobox-border-color-disabled: transparent;
15981600
--system-dialog-fullscreen-header-text-size: 28px;
15991601
--system-dialog-min-inline-size: 288px;
16001602
--system-dialog-confirm-small-width: 400px;

tools/styles/tokens/spectrum/system-theme-bridge.css

+2
Original file line numberDiff line numberDiff line change
@@ -1598,9 +1598,11 @@
15981598
--system-combobox-border-color-focus: var(--spectrum-gray-500);
15991599
--system-combobox-border-color-focus-hover: var(--spectrum-gray-600);
16001600
--system-combobox-border-color-key-focus: var(--spectrum-gray-600);
1601+
--system-combobox-readonly-input-border-color: var(--spectrum-gray-500);
16011602
--system-combobox-background-color-disabled: var(
16021603
--spectrum-disabled-background-color
16031604
);
1605+
--system-combobox-border-color-disabled: transparent;
16041606
--system-dialog-fullscreen-header-text-size: 28px;
16051607
--system-dialog-min-inline-size: 288px;
16061608
--system-dialog-confirm-small-width: 400px;

0 commit comments

Comments
 (0)