fix: define:vars scoping for styles (#1632)

This commit is contained in:
Nate Moore 2021-10-22 14:26:04 -05:00 committed by Drew Powers
parent d9caef63d8
commit b5226e68dd

View file

@ -339,7 +339,7 @@ export function defineStyleVars(astroId: string, vars: Record<any, any>) {
for (const [key, value] of Object.entries(vars)) {
output += ` --${key}: ${value};\n`;
}
return `.${astroId} {${output}}`;
return `.astro-${astroId} {${output}}`;
}
export function defineScriptVars(vars: Record<any, any>) {