Skip to content

Commit e6f0126

Browse files
committed
fix(radio,styles): use latest CSS
1 parent 5006718 commit e6f0126

File tree

8 files changed

+42
-10
lines changed

8 files changed

+42
-10
lines changed

.changeset/funny-insects-sin.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@spectrum-web-components/radio': patch
3+
'@spectrum-web-components/styles': patch
4+
'@spectrum-web-components/theme': patch
5+
---
6+
7+
Remove unnecessary system theme references to reduce complexity for components that don't need the additional mapping layer.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"alex": "^11.0.1",
150150
"cem-plugin-module-file-extensions": "^0.0.5",
151151
"chromatic": "^11.20.0",
152-
"chromedriver": "^134.0.5",
152+
"chromedriver": "134.0.5",
153153
"colors": "^1.4.0",
154154
"common-tags": "^1.8.2",
155155
"custom-elements-manifest": "^2.0.0",

packages/radio/src/radio.css

+12-7
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ governing permissions and limitations under the License.
2222
}
2323

2424
/**
25-
* Work around for https://github.com/adobe/spectrum-css/issues/2251
26-
**/
27-
:host([dir='rtl']) #button:after {
28-
transform: translateX(50%) translateY(-50%);
25+
* @todo updated designs call for the radio button to be visible;
26+
* however as that can cause layout shifts, hold this update until a breaking release.
27+
*/
28+
:host([readonly]) #button {
29+
clip: rect(1px, 1px, 1px, 1px);
30+
clip-path: inset(50%);
31+
position: fixed;
32+
inset-block-end: 100%;
33+
inset-inline-end: 100%;
2934
}
3035

31-
/**
32-
* End workaround
33-
**/
36+
:host([readonly]) #label {
37+
margin-inline-start: 0;
38+
}

tools/theme/src/express/theme-core-tokens.css

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ governing permissions and limitations under the License.
4040
}
4141
}
4242

43+
/* Manual override: can remove after cutover */
44+
:host {
45+
--system-radio-button-background-color: var(--spectrum-gray-50);
46+
}
47+
4348
#scale,
4449
#theme {
4550
width: 100%;

tools/theme/src/express/theme.css

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ governing permissions and limitations under the License.
4141
}
4242
}
4343

44+
/* Manual override: can remove after cutover */
45+
:host {
46+
--system-radio-button-background-color: var(--spectrum-gray-50);
47+
}
48+
4449
#scale,
4550
#theme {
4651
width: 100%;

tools/theme/src/theme-core-tokens.css

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ governing permissions and limitations under the License.
3535
}
3636
}
3737

38+
/* Manual override: can remove after cutover */
39+
:host {
40+
--system-radio-button-background-color: var(--spectrum-gray-50);
41+
}
42+
3843
#scale,
3944
#theme {
4045
width: 100%;

tools/theme/src/theme.css

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ governing permissions and limitations under the License.
3636
}
3737
}
3838

39+
/* Manual override: can remove after cutover */
40+
:host {
41+
--system-radio-button-background-color: var(--spectrum-gray-50);
42+
}
43+
3944
#scale,
4045
#theme {
4146
width: 100%;

yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ __metadata:
258258
alex: "npm:^11.0.1"
259259
cem-plugin-module-file-extensions: "npm:^0.0.5"
260260
chromatic: "npm:^11.20.0"
261-
chromedriver: "npm:^134.0.5"
261+
chromedriver: "npm:134.0.5"
262262
colors: "npm:^1.4.0"
263263
common-tags: "npm:^1.8.2"
264264
custom-elements-manifest: "npm:^2.0.0"
@@ -13912,7 +13912,7 @@ __metadata:
1391213912
languageName: node
1391313913
linkType: hard
1391413914

13915-
"chromedriver@npm:^134.0.5":
13915+
"chromedriver@npm:134.0.5":
1391613916
version: 134.0.5
1391713917
resolution: "chromedriver@npm:134.0.5"
1391813918
dependencies:

0 commit comments

Comments
 (0)