Skip to content

Commit 99c577c

Browse files
authored
feat(well): remove modifiers from the API [SWC-1264] (#4256)
1 parent 024f71d commit 99c577c

File tree

3 files changed

+12
-30
lines changed

3 files changed

+12
-30
lines changed

.changeset/big-glasses-check.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"@spectrum-css/accordion": major
33
"@spectrum-css/actionbar": major
44
"@spectrum-css/actiongroup": major
5+
"@spectrum-css/well": major
56
---
67

78
This update removes `--mod-*` custom property hooks per SWC-1264, see also the RFC for extensible styling.

components/well/dist/metadata.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
{
22
"sourceFile": "index.css",
33
"selectors": [".spectrum-Well"],
4-
"modifiers": [
5-
"--mod-well-background-color",
6-
"--mod-well-border-color",
7-
"--mod-well-border-radius",
8-
"--mod-well-border-width",
9-
"--mod-well-content-color",
10-
"--mod-well-margin-top",
11-
"--mod-well-min-width",
12-
"--mod-well-padding"
13-
],
4+
"modifiers": [],
145
"component": [
15-
"--spectrum-well-background-color",
16-
"--spectrum-well-border-color",
176
"--spectrum-well-border-radius",
18-
"--spectrum-well-border-width",
19-
"--spectrum-well-content-color",
207
"--spectrum-well-margin-top",
218
"--spectrum-well-min-width",
229
"--spectrum-well-padding"
2310
],
2411
"global": [
2512
"--spectrum-body-color",
2613
"--spectrum-border-width-100",
27-
"--spectrum-gray-1000-rgb",
28-
"--spectrum-gray-800-rgb"
14+
"--spectrum-gray-1000",
15+
"--spectrum-gray-800"
2916
],
3017
"passthroughs": [],
3118
"high-contrast": []

components/well/index.css

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,15 @@
1212
*/
1313

1414
.spectrum-Well {
15-
--spectrum-well-border-color: rgb(var(--spectrum-gray-1000-rgb), 0.05);
16-
17-
--spectrum-well-border-width: var(--spectrum-border-width-100);
18-
--spectrum-well-content-color: var(--spectrum-body-color);
19-
--spectrum-well-background-color: rgb(var(--spectrum-gray-800-rgb), 0.02);
20-
2115
text-align: start;
2216
display: block;
23-
min-inline-size: var(--mod-well-min-width, var(--spectrum-well-min-width));
24-
padding: var(--mod-well-padding, var(--spectrum-well-padding));
25-
margin-block-start: var(--mod-well-margin-top, var(--spectrum-well-margin-top));
26-
border-width: var(--mod-well-border-width, var(--spectrum-well-border-width));
17+
min-inline-size: var(--spectrum-well-min-width);
18+
padding: var(--spectrum-well-padding);
19+
margin-block-start: var(--spectrum-well-margin-top);
20+
border-width: var(--spectrum-border-width-100);
2721
border-style: solid;
28-
border-radius: var(--mod-well-border-radius, var(--spectrum-well-border-radius));
29-
background-color: var(--mod-well-background-color, var(--spectrum-well-background-color));
30-
border-color: var(--mod-well-border-color, var(--spectrum-well-border-color));
31-
color: var(--mod-well-content-color, var(--spectrum-well-content-color));
22+
border-radius: var(--spectrum-well-border-radius);
23+
background-color: color-mix(in sRGB, var(--spectrum-gray-800) 2%, transparent);
24+
border-color: color-mix(in sRGB, var(--spectrum-gray-1000) 5%, transparent);
25+
color: var(--spectrum-body-color);
3226
}

0 commit comments

Comments
 (0)