We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0
https://codesandbox.io/s/great-grothendieck-3zx5p?file=/src/App.vue
When trying following code, the newly inserted nodes do not have the style attatched.
<template> <div v-for="(x, y, z) in object" :key="z" class="text" @click="addPropAndChangeColor" > {{ x }} </div> </template> <script setup> import { reactive, ref } from 'vue' const object = reactive({ firstProperty: 'This Has Color', SecondProperty: 'This Also Has color' }) const color = ref('red') const addPropAndChangeColor = function () { object[Math.random()] = 'Added Property does not have color' color.value = 'blue' } export { object, addPropAndChangeColor, color } </script> <style vars="{ color }"> .text { color: var(--color); } </style>
if you wrap the v-for in a div so its not on the root the injection works.
<template> <div> <div v-for="(x, y, z) in object" :key="z" class="text" @click="addPropAndChangeColor" > {{ x }} </div> </div> </template>
Adding the styles to the node at the root should have styles
They do not have styles
The text was updated successfully, but these errors were encountered:
fix(cssVars): should attach css vars while subtree changed
subtree
0e94580
fix vuejs#2177
fix(sfc/style-vars): should attach css vars while subtree changed (#…
408a8ca
…2178) * fix(cssVars): should attach css vars while `subtree` changed fix #2177 * fix: fix test
Successfully merging a pull request may close this issue.
Version
3.0.0
Reproduction link
https://codesandbox.io/s/great-grothendieck-3zx5p?file=/src/App.vue
Steps to reproduce
When trying following code, the newly inserted nodes do not have the style attatched.
if you wrap the v-for in a div so its not on the root the injection works.
What is expected?
Adding the styles to the node at the root should have styles
What is actually happening?
They do not have styles
The text was updated successfully, but these errors were encountered: