Skip to content

Commit 80d3338

Browse files
committed
feat: bug fixes for reducing theming variables
1 parent 7eadd1c commit 80d3338

File tree

6 files changed

+17
-89
lines changed

6 files changed

+17
-89
lines changed

components/calendar/dist/metadata.json

+1-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
".spectrum-Calendar-body",
77
".spectrum-Calendar-date",
88
".spectrum-Calendar-date.is-disabled",
9-
".spectrum-Calendar-date.is-disabled.is-range-selection",
109
".spectrum-Calendar-date.is-disabled.is-selected",
1110
".spectrum-Calendar-date.is-focused",
1211
".spectrum-Calendar-date.is-focused.is-range-selection",
@@ -32,7 +31,6 @@
3231
".spectrum-Calendar-date.is-range-selection.is-selection-start.is-selection-end",
3332
".spectrum-Calendar-date.is-range-selection.is-selection-start:after",
3433
".spectrum-Calendar-date.is-range-selection.is-selection-start:before",
35-
".spectrum-Calendar-date.is-range-selection.is-today",
3634
".spectrum-Calendar-date.is-range-selection:hover",
3735
".spectrum-Calendar-date.is-selected",
3836
".spectrum-Calendar-date.is-selected:hover:not(.is-selection-end, .is-selection-start)",
@@ -185,32 +183,20 @@
185183
"--mod-actionbutton-min-width"
186184
],
187185
"high-contrast": [
188-
"--highcontrast-calendar-button-icon-color",
189186
"--highcontrast-calendar-day-background-cap-selected",
190-
"--highcontrast-calendar-day-background-color-cap-selected",
191-
"--highcontrast-calendar-day-background-color-down",
192-
"--highcontrast-calendar-day-background-color-hover",
193-
"--highcontrast-calendar-day-background-color-key-focus",
194-
"--highcontrast-calendar-day-background-color-selected",
195-
"--highcontrast-calendar-day-background-color-selected-hover",
196187
"--highcontrast-calendar-day-background-down",
197188
"--highcontrast-calendar-day-background-focus",
198189
"--highcontrast-calendar-day-background-hover",
199190
"--highcontrast-calendar-day-background-selected",
200191
"--highcontrast-calendar-day-background-selected-hover",
201192
"--highcontrast-calendar-day-border-color-focus",
202-
"--highcontrast-calendar-day-border-color-key-focus",
203193
"--highcontrast-calendar-day-text-color-cap-selected",
204-
"--highcontrast-calendar-day-text-color-disabled",
205194
"--highcontrast-calendar-day-text-color-hover",
206195
"--highcontrast-calendar-day-text-color-key-focus",
207196
"--highcontrast-calendar-day-text-color-selected",
208197
"--highcontrast-calendar-day-title-text-color",
209-
"--highcontrast-calendar-day-today-background-color-selected-hover",
210198
"--highcontrast-calendar-day-today-background-selected-hover",
211199
"--highcontrast-calendar-day-today-border-color",
212-
"--highcontrast-calendar-day-today-border-color-disabled",
213-
"--highcontrast-calendar-day-today-text-color",
214-
"--highcontrast-calendar-day-today-text-color-disabled"
200+
"--highcontrast-calendar-day-today-text-color"
215201
]
216202
}

components/calendar/index.css

-53
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,6 @@
1313

1414
@import "./themes/spectrum-two.css";
1515

16-
@media (forced-colors: active) {
17-
.spectrum-Calendar-prevMonth,
18-
.spectrum-Calendar-nextMonth {
19-
--highcontrast-calendar-button-icon-color: ButtonText;
20-
}
21-
22-
.spectrum-Calendar-date {
23-
--highcontrast-calendar-day-background-color-cap-selected: Highlight;
24-
--highcontrast-calendar-day-background-color-down: ButtonFace;
25-
--highcontrast-calendar-day-background-color-hover: Transparent;
26-
--highcontrast-calendar-day-background-color-key-focus: ButtonFace;
27-
--highcontrast-calendar-day-background-color-selected-hover: Transparent;
28-
--highcontrast-calendar-day-background-color-selected: Highlight;
29-
--highcontrast-calendar-day-border-color-key-focus: ButtonText;
30-
--highcontrast-calendar-day-text-color-cap-selected: HighlightText;
31-
--highcontrast-calendar-day-text-color-disabled: GrayText;
32-
--highcontrast-calendar-day-text-color-hover: ButtonText;
33-
--highcontrast-calendar-day-text-color-key-focus: ButtonText;
34-
--highcontrast-calendar-day-text-color-selected: HighlightText;
35-
--highcontrast-calendar-day-title-text-color: CanvasText;
36-
--highcontrast-calendar-day-today-background-color-selected-hover: Highlight;
37-
--highcontrast-calendar-day-today-border-color-disabled: GrayText;
38-
--highcontrast-calendar-day-today-border-color: ButtonText;
39-
--highcontrast-calendar-day-today-text-color-disabled: GrayText;
40-
--highcontrast-calendar-day-today-text-color: ButtonText;
41-
42-
forced-color-adjust: none;
43-
44-
&.is-range-selection {
45-
&.is-today {
46-
color: HighlightText;
47-
}
48-
49-
&.is-selection-start::after,
50-
&.is-selection-end::after {
51-
content: none;
52-
}
53-
}
54-
55-
&.is-disabled {
56-
&.is-range-selection {
57-
background: Highlight;
58-
color: HighlightText;
59-
}
60-
61-
&.is-selected {
62-
background: Highlight;
63-
color: HighlightText;
64-
}
65-
}
66-
}
67-
}
68-
6916
.spectrum-Calendar {
7017
--spectrum-calendar-day-width: var(--mod-calendar-day-width, var(--spectrum-component-height-100));
7118
--spectrum-calendar-day-height: var(--mod-calendar-day-height, var(--spectrum-component-height-100));

components/progressbar/index.css

+14-12
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,21 @@
9898
&:lang(ko) {
9999
--mod-progressbar-line-height: var(--spectrum-progressbar-line-height-cjk);
100100
}
101+
}
102+
103+
@media (forced-colors: active) {
104+
.spectrum-ProgressBar {
105+
--highcontrast-progressbar-fill-color: ButtonText;
106+
--highcontrast-progressbar-track-color: ButtonFace;
107+
}
108+
109+
.spectrum-ProgressBar-track {
110+
forced-color-adjust: none;
111+
border: 1px solid ButtonText;
112+
}
113+
}
101114

115+
.spectrum-ProgressBar {
102116
position: relative;
103117
display: inline-flex;
104118
flex-flow: row wrap;
@@ -191,18 +205,6 @@
191205
}
192206
}
193207

194-
@media (forced-colors: active) {
195-
.spectrum-ProgressBar {
196-
--highcontrast-progressbar-fill-color: ButtonText;
197-
--highcontrast-progressbar-track-color: ButtonFace;
198-
}
199-
200-
.spectrum-ProgressBar-track {
201-
forced-color-adjust: none;
202-
border: 1px solid ButtonText;
203-
}
204-
}
205-
206208
@keyframes indeterminate-loop {
207209
from {
208210
transform: translate(calc(-1 * var(--spectrum-progressbar-dir-indeterminate-multiplier) * var(--spectrum-progressbar-fill-size-indeterminate)));

components/stepper/index.css

+1-8
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@
9090
--spectrum-stepper-height: var(--mod-stepper-height, var(--spectrum-component-height-75));
9191
}
9292

93-
&,
94-
&.spectrum-Stepper--sizeM {
95-
--spectrum-stepper-button-width: var(--spectrum-in-field-button-width-stacked-medium);
96-
--spectrum-stepper-height: var(--spectrum-component-height-100);
97-
}
98-
9993
&.spectrum-Stepper--sizeL {
10094
--spectrum-stepper-button-width: var(--mod-stepper-button-width, var(--spectrum-in-field-button-width-stacked-large));
10195
--spectrum-stepper-height: var(--mod-stepper-height, var(--spectrum-component-height-200));
@@ -321,13 +315,12 @@
321315
transition: border-color var(--spectrum-stepper-animation-duration) ease-in-out;
322316
}
323317

324-
/* stylelint-disable selector-class-pattern -- @todo update hide-stepper class to standard variant syntax */
318+
/* stylelint-disable-next-line selector-class-pattern -- @todo update hide-stepper class to standard variant syntax */
325319
.spectrum-Stepper.hide-stepper .spectrum-Stepper-input {
326320
border-start-end-radius: var(--spectrum-stepper-border-radius);
327321
border-end-end-radius: var(--spectrum-stepper-border-radius);
328322
border-inline-end-width: var(--mod-stepper-border-width, var(--spectrum-stepper-border-width));
329323
}
330-
/* stylelint-enable selector-class-pattern */
331324

332325
/* --- Quiet variant styles --- */
333326
.spectrum-Stepper--quiet {

components/stepper/stories/template.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const Template = ({
5252
"is-keyboardFocused": isKeyboardFocused,
5353
"is-invalid": isInvalid,
5454
"is-disabled": isDisabled,
55+
"hide-stepper": hideStepper,
5556
...customClasses.reduce((a, c) => ({ ...a, [c]: true }), {}),
5657
})}
5758
id=${ifDefined(id)}

components/stepper/themes/express.css

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
/** Invalid **/
3939
--spectrum-stepper-border-color-invalid: transparent;
40-
--spectrum-stepper-border-color-hover-invalid: transparent;
4140
--spectrum-stepper-border-color-focus-invalid: transparent;
4241
--spectrum-stepper-border-color-focus-hover-invalid: transparent;
4342
--spectrum-stepper-border-color-keyboard-focus-invalid: transparent;

0 commit comments

Comments
 (0)