Comments (1)
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.
from astro.
Related Issues (20)
- Build error with both a conditional ternary and a nullish coalescing operators HOT 1
- View transitions: `transitionEnabledOnThisPage` returns `true` when fallback is set to `none` HOT 3
- Server Island Missing Runtime Env HOT 4
- View Transition Animation Not Working for Async Components in MDX Files HOT 6
- Deploy on Vercel with server mode not working since 4.11.6 HOT 3
- When using a strict package manager like pnpm, you may need to manually install Sharp into your project even though it is an Astro dependency. HOT 1
- build fails starting with 4.11.6 HOT 1
- `astro-island,astro-slot,astro-static-slot{display:contents}` is injected in the body in both dev and production HOT 2
- Build failed using `rest params` with static file endpoints. HOT 6
- Dev Server: Astro tries to rewrite Error messages and sometimes fails at it
- Can't consume web components directly in MDX HOT 2
- vite.build.assetsInlineLimit is invalid HOT 1
- HTML comments can break Vue's class inheritance
- `Astro.redirect` JSDoc comment is wrong
- Barrel file import stops tree-shaking for css in production build HOT 1
- Replacing Images Does Not Auto Update HOT 2
- Server actions cause an error when returning a value of 0. HOT 1
- How to share states between Server Islands? HOT 1
- pages not loading when deployed to Firebase HOT 3
- nested dynamic routing can't work with encode URL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astro.