From 053b3894d6b9ab4626b42632cd655cff6a5d4ebd Mon Sep 17 00:00:00 2001 From: Cats Juice Date: Tue, 14 May 2024 23:48:40 +0800 Subject: [PATCH] feat(theme): support for scoped theme via data-theme --- packages/theme/src/index.css.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/theme/src/index.css.ts b/packages/theme/src/index.css.ts index 1d51c86..cafb9e6 100644 --- a/packages/theme/src/index.css.ts +++ b/packages/theme/src/index.css.ts @@ -6,6 +6,10 @@ globalStyle(':root', { vars: lightCssVariables, }); -globalStyle(':root[data-theme="dark"]', { +globalStyle('[data-theme="light"]', { + vars: lightCssVariables, +}); + +globalStyle('[data-theme="dark"]', { vars: darkCssVariables, });