You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CSS variable injection should works fine with any type of components, as no special reminders in the document.
What is actually happening?
The element to be teleported cannot be styled via CSS variable injection.
Actually the State-Driven Dynamic CSS will finally convert to CSS custom property. And the custom property will be applied to the component's root element via inline styles. If we apply the CSS variable injection to the child element inside the teleport, it will no longer be able to access the inline custom property from the original root element.
<body><divid="app"><!-- The component root element --><divclass="parent" style="--c55e1cb4-progress:50%; --c55e1cb4-theme_color:#79b8ff;"></div></div><!-- The child element inside the teleport has been moved here--><!-- It will no longer have access to inline CSS custom property on the original root element --><divclass="child">111</div></body>
The text was updated successfully, but these errors were encountered:
Version
3.2.21
Reproduction link
sfc.vuejs.org/
Steps to reproduce
To reproduce this bug is quite easy, only two steps!
First, create a Vue SFC like this:
Then use a
<teleport>
component to wrap the "child" element:What is expected?
The CSS variable injection should works fine with any type of components, as no special reminders in the document.
What is actually happening?
The element to be teleported cannot be styled via CSS variable injection.
Actually the State-Driven Dynamic CSS will finally convert to CSS custom property. And the custom property will be applied to the component's root element via inline styles. If we apply the CSS variable injection to the child element inside the teleport, it will no longer be able to access the inline custom property from the original root element.
The text was updated successfully, but these errors were encountered: