Skip to content

Commit bdc66c9

Browse files
authored
feat(page): remove modifiers from the API [SWC-1264] (#4286)
1 parent f224547 commit bdc66c9

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

.changeset/weak-colts-divide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@spectrum-css/badge": major
88
"@spectrum-css/miller": major
99
"@spectrum-css/well": major
10+
"@spectrum-css/page": major
1011
---
1112

1213
This update removes `--mod-*` custom property hooks per SWC-1264, see also the RFC for extensible styling. In addition, this update cleans up any component-level custom properties that did not rely on the CSS cascade to define the styles; this was done to reduce the number of custom properties that are defined at the component level and trim down the size of the CSS we are shipping to consumers.

components/page/dist/metadata.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"sourceFile": "index.css",
33
"selectors": [":root"],
4-
"modifiers": ["--mod-page-background", "--mod-page-content-tap-highlight"],
5-
"component": [
6-
"--spectrum-page-background-color",
7-
"--spectrum-page-content-tap-highlight"
8-
],
4+
"modifiers": [],
5+
"component": [],
96
"global": ["--spectrum-gray-75", "--spectrum-transparent-black-25"],
107
"passthroughs": [],
118
"high-contrast": []

components/page/index.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
*/
1313

1414
:root {
15-
--spectrum-page-background-color: var(--mod-page-background, var(--spectrum-gray-75));
16-
--spectrum-page-content-tap-highlight: var(--mod-page-content-tap-highlight, var(--spectrum-transparent-black-25));
17-
18-
background: var(--spectrum-page-background-color);
15+
background: var(--spectrum-gray-75);
1916

2017
/* The highlight that appears over a link while it's being tapped */
21-
-webkit-tap-highlight-color: var(--spectrum-page-content-tap-highlight);
18+
-webkit-tap-highlight-color: var(--spectrum-transparent-black-25);
2219
}

0 commit comments

Comments
 (0)