Skip to content
New issue

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

CSS variables do not work with top level Suspense component #1713

Closed
tcsnyder opened this issue Jul 26, 2020 · 0 comments · Fixed by #1718
Closed

CSS variables do not work with top level Suspense component #1713

tcsnyder opened this issue Jul 26, 2020 · 0 comments · Fixed by #1718

Comments

@tcsnyder
Copy link

Version

3.0.0-rc.4

Reproduction link

https://github.com/tcsnyder/vue3-suspense-css-vars

Steps to reproduce

In App.vue have a top level suspense component. Set up a css variable in the component and include it in the style tag.

sfc-style-variables

In the #fallback and #default templates of the suspense components use the css variable for a style.

What is expected?

the css variable works in the suspense #fallback and #template

What is actually happening?

since the suspense component is not rendered in the DOM the css variables are being lost


if the suspense component is not the top level component, then it works as expected. Workaround for now is to wrap the suspense component in a div

yyx990803 pushed a commit to underfin/vue-next that referenced this issue Jul 28, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant