v-bind() in CSS doesn't work for Teleports
Vue version
3.2.41
Link to minimal reproduction
Steps to reproduce
- Use
component to teleport some elements of your component outside of its flow. - Apply to those elements classes with usage of v-bind()
What is expected?
Custom properties created for teleported elements and successfully applied.
What is actually happening?
Custom properties created only for parent component and since teleported elements are outside of it, custom variables are inaccessible for them.
System Info
No response
Any additional comments?
I am not sure, but maybe it is a good idea to store all custom variables created via v-bind() in CSS on the root level of the document?
Let's say I have a button which color defined in store. In component I apply this color using v-bind(), and the custom property will be created for each button (i.e. for erery property and every single element that is using v-bind), despite the fact that its value relies on the same variable.