Closed aleandro-coppola closed 5 months ago
This is a limitation of how define:vars
works. It cannot define variables in parent components. This is because the way it works is to attach the values to the elements within the template. So although your selector is at the root, the actual value of the variables is in the h1 in that template, thus it never selects. If you change the selector to h1
it works.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
On DefaultLayout.astro
I add a child component AppSiteconfig.astro with this code
But the --color-primary not working The same code directly on DefaultLayout.astro works:
What's the expected result?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-hvhglr
Participation