Skip to content

Commit f8594ae

Browse files
authored
fix(css-variables): add root selector without classname
Need to add the `:root` in addition to `:root.classname` for some use cases, when we do not need to add the class in html tag for sites that does not have multiple themes
1 parent 4586e26 commit f8594ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/scripts/create-css-variables.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ export const generateThemeCss = ({
6969
uvTheme: UvThemeType
7070
filename: string
7171
}) =>
72-
`:root.${filename}-theme {\n${
72+
`:root,\n
73+
:root.${filename}-theme {\n${
7374
createCssVariables('color', uvTheme.colors) +
7475
createCssVariables('radius', uvTheme.radii) +
7576
createCssVariables('shadow', uvTheme.shadows) +

0 commit comments

Comments
 (0)