Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Native scope style element in template can cause compiler error #12456

Closed
lejunyang opened this issue Nov 21, 2024 · 1 comment
Closed

Native scope style element in template can cause compiler error #12456

lejunyang opened this issue Nov 21, 2024 · 1 comment

Comments

@lejunyang
Copy link

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNp9kT9PwzAQxb+K5blqBpiqUPFHHWAAVDp6iZIjuLhny3cpRVW+O2dbKR2gk3333rN+dz7quxDm+wH0QtfURhtYEfAQlgYN1lVplYJhF1zDIJVSdWf3+SLX1u+CR0BWlm6MJv52YPTyllofQB0VhQblaL3zcaH6CIBqVGNdnYLTSzn6XzBCV2LFNUXEs1yLtIEDi5bKDFgVwro649YzzfI4vtt+viWPMvUxmY1OKNZBfAlsPZLRC5WVpDXO+a+n3OM4wGzqtx/Qfv7R39Ih9Yx+jUAQ97KMk8ZN7IGLvHp7FuYzcee7Ia3ugrgG8m5IjMV2P2An2Ge+TPsoi41ssd/Q6sCANA2VQJNzzH6j5esfLoz+i3s1v845g6MefwDExbv6

Steps to reproduce

image

What is expected?

CSS Scope allows style element like <style>@scope {}</style> exist in normal HTML elements and apply scoped style on parent element, details can be found in MDN
Though this is quite a new feature, and we can use component to avoid compiler detection
I am not sure if we should have an option to allow style element exist in template.

What is actually happening?

style element can cause compiler error and the style node is removed

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

This is the expected behavior. It is not recommended to add style or script tags in the template.

@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants