Skip to content

Commit ff85c07

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

File tree

6 files changed

+59
-27
lines changed

6 files changed

+59
-27
lines changed

.changeset/funny-insects-sin.md

Lines changed: 7 additions & 0 deletions
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.

packages/radio/src/radio.css

Lines changed: 12 additions & 7 deletions
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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import url('@spectrum-web-components/styles/tokens/global-vars.css');
14-
@import url('@spectrum-web-components/styles/tokens/spectrum/global-vars.css');
15-
@import url('@spectrum-web-components/styles/tokens/express/global-vars.css');
16-
@import url('@spectrum-web-components/styles/tokens/express/system-theme-bridge.css');
17-
@import url('@spectrum-web-components/styles/typography.css');
13+
@import url("@spectrum-web-components/styles/tokens/global-vars.css");
14+
@import url("@spectrum-web-components/styles/tokens/spectrum/global-vars.css");
15+
@import url("@spectrum-web-components/styles/tokens/express/global-vars.css");
16+
@import url("@spectrum-web-components/styles/tokens/express/system-theme-bridge.css");
17+
@import url("@spectrum-web-components/styles/typography.css");
1818

1919
:host {
2020
display: block;
@@ -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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import url('@spectrum-web-components/styles/tokens/global-vars.css');
14-
@import url('@spectrum-web-components/styles/tokens/spectrum/global-vars.css');
15-
@import url('@spectrum-web-components/styles/tokens/express/global-vars.css');
16-
@import url('@spectrum-web-components/styles/express/core-global.css');
17-
@import url('@spectrum-web-components/styles/tokens/express/system-theme-bridge.css');
18-
@import url('@spectrum-web-components/styles/typography.css');
13+
@import url("@spectrum-web-components/styles/tokens/global-vars.css");
14+
@import url("@spectrum-web-components/styles/tokens/spectrum/global-vars.css");
15+
@import url("@spectrum-web-components/styles/tokens/express/global-vars.css");
16+
@import url("@spectrum-web-components/styles/express/core-global.css");
17+
@import url("@spectrum-web-components/styles/tokens/express/system-theme-bridge.css");
18+
@import url("@spectrum-web-components/styles/typography.css");
1919

2020
:host {
2121
display: block;
@@ -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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import url('@spectrum-web-components/styles/tokens/global-vars.css');
14-
@import url('@spectrum-web-components/styles/tokens/spectrum/global-vars.css');
15-
@import url('@spectrum-web-components/styles/tokens/spectrum/system-theme-bridge.css');
16-
@import url('@spectrum-web-components/styles/typography.css');
13+
@import url("@spectrum-web-components/styles/tokens/global-vars.css");
14+
@import url("@spectrum-web-components/styles/tokens/spectrum/global-vars.css");
15+
@import url("@spectrum-web-components/styles/tokens/spectrum/system-theme-bridge.css");
16+
@import url("@spectrum-web-components/styles/typography.css");
1717

1818
:host {
1919
display: block;
@@ -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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import url('@spectrum-web-components/styles/core-global.css');
14-
@import url('@spectrum-web-components/styles/tokens/global-vars.css');
15-
@import url('@spectrum-web-components/styles/tokens/spectrum/global-vars.css');
16-
@import url('@spectrum-web-components/styles/tokens/spectrum/system-theme-bridge.css');
17-
@import url('@spectrum-web-components/styles/typography.css');
13+
@import url("@spectrum-web-components/styles/core-global.css");
14+
@import url("@spectrum-web-components/styles/tokens/global-vars.css");
15+
@import url("@spectrum-web-components/styles/tokens/spectrum/global-vars.css");
16+
@import url("@spectrum-web-components/styles/tokens/spectrum/system-theme-bridge.css");
17+
@import url("@spectrum-web-components/styles/typography.css");
1818

1919
:host {
2020
display: block;
@@ -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%;

0 commit comments

Comments
 (0)