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 doesn't fail even though there are unhandled exceptions
- [Actions] Zod object.passthrough does not allow extra input keys/values HOT 1
- Dynamic attribute isn't recognized by Tailwind unless there's at least one exact concrete implementation HOT 1
- Using React component inside MDX file fails with Container API HOT 1
- New build error - Astro 4.13.4 HOT 9
- Dynamic import and rendering of Framework component throws Could not render `ComponentName`. No matching import has been found for `ComponentName` HOT 3
- Server Islands does not seem to work with basepath HOT 6
- MDX with frontmatter reports errors on wrong line HOT 1
- Astro `4.14.0` build error with Cloudflare adapter HOT 5
- experimental.contentIntellisense fails to generate JSON schemas with "Asynchronous transform" error HOT 2
- context.site is undefined when using the "--site https://foo.com" CLI argument HOT 2
- Content layer validates already validated objects causing transforms to fail a validation HOT 1
- pnpm create astro skips installing deps and git HOT 7
- bunx @astrojs/upgrade fails HOT 2
- Astro actions cause warning in dev mode for static pages
- Error unterminated string literal when you have a string that contains `</script>`
- Vue Fragment doesn't render
- ```astro:env``` breaks in Content Collection ```config.ts```
- Image loading issue in tabs
- Warning messages when reading cookies in middleware functions with hybrid output
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.