Skip to content

Commit c8194b0

Browse files
authored
fix(stylelint): addresses remaining stylelint violations (#3359)
1 parent c01ec97 commit c8194b0

File tree

27 files changed

+59
-53
lines changed

27 files changed

+59
-53
lines changed

.changeset/clever-otters-mix.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
"@spectrum-css/infieldbutton": minor
3+
"@spectrum-css/logicbutton": minor
4+
"@spectrum-css/progressbar": minor
5+
"@spectrum-css/colorwheel": minor
6+
"@spectrum-css/assetcard": minor
7+
"@spectrum-css/colorarea": minor
8+
"@spectrum-css/calendar": minor
9+
"@spectrum-css/checkbox": minor
10+
"@spectrum-css/underlay": minor
11+
"@spectrum-css/stepper": minor
12+
"@spectrum-css/button": minor
13+
"@spectrum-css/modal": minor
14+
"@spectrum-css/radio": minor
15+
"@spectrum-css/table": minor
16+
"@spectrum-css/card": minor
17+
"@spectrum-css/site": minor
18+
"@spectrum-css/tokens": minor
19+
---
20+
21+
This resolves our remaining stylelint issues around undefined tokens, rule order, unused values and color syntax.
22+
23+
- Updates invalid color syntax from `rgba(N, N, N, N)` to `rgba(N N N / N)`.
24+
- In cases of duplicate properties, preserves the property that would be applied given current code structure.
25+
- Updates misnamed tokens to use valid tokens (`table/index.css`).

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
filter_mode: diff_context
8787
# stylelint_input: "components/*/index.css components/*/themes/*.css"
8888
stylelint_input: "${{ inputs.styles_added_files }} ${{ inputs.styles_modified_files }}"
89-
stylelint_config: stylelint.config.js
89+
stylelint_config: "${{ github.workspace }}/stylelint.config.js"
9090

9191
- name: Run eslint on packages and stories
9292
uses: reviewdog/[email protected]

components/assetcard/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272

273273
border-radius: var(--mod-assetcard-selectionindicator-border-radius, var(--spectrum-assetcard-selectionindicator-border-radius));
274274

275-
box-shadow: 0 var(--spectrum-assetcard-selectionindicator-offset-y) var(--spectrum-assetcard-selectionindicator-blur) rgb(0, 0, 0, 15%);
275+
box-shadow: 0 var(--spectrum-assetcard-selectionindicator-offset-y) var(--spectrum-assetcard-selectionindicator-blur) rgb(0 0 0 / 15%);
276276

277277
color: var(--highcontrast-assetcard-selectionindicator-color, var(--mod-assetcard-selectionindicator-color, var(--spectrum-assetcard-selectionindicator-color)));
278278
font-weight: var(--mod-assetcard-selectionindicator-font-weight, var(--spectrum-assetcard-selectionindicator-font-weight));

components/assetcard/themes/express.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
@container (--system: express) {
1717
.spectrum-AssetCard {
18-
--spectrum-assetcard-overlay-background-color: rgba(109, 115, 246, 20%);
18+
--spectrum-assetcard-overlay-background-color: rgba(109 115 246 / 20%);
1919
}
2020
}

components/assetcard/themes/spectrum.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313

1414
@container (--system: spectrum) {
1515
.spectrum-AssetCard {
16-
--spectrum-assetcard-overlay-background-color: rgba(27, 127, 245, 10%);
16+
--spectrum-assetcard-overlay-background-color: rgba(27 127 245 / 10%);
1717
}
1818
}

components/calendar/index.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@
413413
@media (forced-colors: active) {
414414
.spectrum-Calendar-prevMonth,
415415
.spectrum-Calendar-nextMonth {
416-
--highcontrast-calendar-button-icon-color-disabled: GrayText;
417416
--highcontrast-calendar-button-icon-color: ButtonText;
418417
}
419418

@@ -429,7 +428,6 @@
429428
--highcontrast-calendar-day-text-color-disabled: GrayText;
430429
--highcontrast-calendar-day-text-color-hover: ButtonText;
431430
--highcontrast-calendar-day-text-color-key-focus: ButtonText;
432-
--highcontrast-calendar-day-text-color-selected-hover: HighlightText;
433431
--highcontrast-calendar-day-text-color-selected: HighlightText;
434432
--highcontrast-calendar-day-title-text-color: CanvasText;
435433
--highcontrast-calendar-day-today-background-color-selected-hover: Highlight;

components/calendar/metadata/metadata.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
"passthroughs": [],
171171
"high-contrast": [
172172
"--highcontrast-calendar-button-icon-color",
173-
"--highcontrast-calendar-button-icon-color-disabled",
174173
"--highcontrast-calendar-day-background-color-cap-selected",
175174
"--highcontrast-calendar-day-background-color-down",
176175
"--highcontrast-calendar-day-background-color-hover",
@@ -183,7 +182,6 @@
183182
"--highcontrast-calendar-day-text-color-hover",
184183
"--highcontrast-calendar-day-text-color-key-focus",
185184
"--highcontrast-calendar-day-text-color-selected",
186-
"--highcontrast-calendar-day-text-color-selected-hover",
187185
"--highcontrast-calendar-day-title-text-color",
188186
"--highcontrast-calendar-day-today-background-color-selected-hover",
189187
"--highcontrast-calendar-day-today-border-color",

components/card/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
}
159159

160160
&.is-drop-target {
161-
--mod-card-background-color: var(--spectrum-card-background-color-quiet, var(--spectrum-background-base-color));
161+
--mod-card-background-color: var(--spectrum-background-base-color);
162162

163163
border-color: var(--highcontrast-card-border-color-selected, var(--mod-card-border-color-selected, var(--spectrum-card-border-color-selected)));
164164
box-shadow: 0 0 0 1px var(--highcontrast-card-border-color-selected, var(--mod-card-border-color-selected, var(--spectrum-card-border-color-selected)));

components/card/metadata/metadata.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@
148148
"--spectrum-card-actions-size",
149149
"--spectrum-card-actions-spacing",
150150
"--spectrum-card-background-color",
151-
"--spectrum-card-background-color-quiet",
152151
"--spectrum-card-body-font-color",
153152
"--spectrum-card-body-font-family",
154153
"--spectrum-card-body-font-size",

components/checkbox/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@
442442
}
443443

444444
.spectrum-Checkbox-box {
445+
--spectrum-checkbox-spacing: calc(var(--mod-checkbox-height, var(--spectrum-checkbox-height)) - var(--mod-checkbox-control-size, var(--spectrum-checkbox-control-size)));
446+
445447
display: flex;
446448
align-items: center;
447449
justify-content: center;
@@ -452,7 +454,6 @@
452454
block-size: var(--mod-checkbox-control-size, var(--spectrum-checkbox-control-size));
453455

454456
/* Fix vertical alignment when not wrapping since we're flex-start */
455-
--spectrum-checkbox-spacing: calc(var(--mod-checkbox-height, var(--spectrum-checkbox-height)) - var(--mod-checkbox-control-size, var(--spectrum-checkbox-control-size)));
456457
margin: calc(var(--mod-checkbox-spacing, var(--spectrum-checkbox-spacing)) / 2) 0;
457458

458459
flex-grow: 0;

0 commit comments

Comments
 (0)