Skip to content

Commit 6c17b7c

Browse files
authored
fix: Apply page.css styles in shadow DOM (#8852)
1 parent 7ffbbc3 commit 6c17b7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@react-spectrum/s2/src/page.macro.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function generatePageStyles(this: MacroContext | void): void {
2525
if (this && typeof this.addAsset === 'function') {
2626
this.addAsset({
2727
type: 'css',
28-
content: `html {
28+
content: `:where(:root, :host) {
2929
color-scheme: light dark;
3030
--s2-container-bg: ${colorToken(tokens['background-base-color'])};
3131
background: var(--s2-container-bg);
@@ -68,7 +68,7 @@ export function generateDefaultColorSchemeStyles(this: MacroContext | void): voi
6868
this.addAsset({
6969
type: 'css',
7070
content: `@layer _.a {
71-
:where(html) {
71+
:where(:root, :host) {
7272
--lightningcss-light: initial;
7373
--lightningcss-dark: ;
7474
--s2-scale: 1;

0 commit comments

Comments
 (0)