Description
Vue version
3.2.45
Link to minimal reproduction
Steps to reproduce
click the toggle button off and on
What is expected?
all text should be red
What is actually happening?
using v-bind inside of a teleport inside of a transition fails. It does actually work if there is an extra div wrapper around the transition. However in a case where a v-if transition is being triggered because the parent component has been unmounted, this will not work.
System Info
No response
Any additional comments?
For anyone encountering this bug in the meantime
a workaround is to inject your own css var with [@vueuse/head]. In my case there was only one of the component at a time, but you could easily generate a unique name...
useHead(
computed(() => ({
style: [{ children: `:root {--my-special-css-var: ${myVar}; }` }],
})),
);