Skip to content

feat(vapor): scopeId #13422

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

Draft
wants to merge 862 commits into
base: minor
Choose a base branch
from
Draft

feat(vapor): scopeId #13422

wants to merge 862 commits into from

Conversation

edison1105
Copy link
Member

No description provided.

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You

Verified

This commit was signed with the committer’s verified signature.
yyx990803 Evan You
Copy link
Member

@LittleSound LittleSound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relevant Information

Scope ID is an important mechanism in Vue used for implementing style scoping (Scoped CSS). Its main role is style isolation and scope passing.

In slot content, both the parent component's scopeId and the child component's scopeId (with a -s suffix) are included. This ensures that the slot content can inherit the parent component's styles while maintaining the child component's style isolation.

Copy link
Member

@LittleSound LittleSound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The discussion of Team Vapor is as follows:

There are actually many ways to partition CSS by component. Vue already supports more than one approach, and the previous Scope ID method wasn’t necessarily the most performant one.

So, if we’re unsure about doing it right at the moment — or if the current direction feels problematic — we don’t have to implement it just yet. We can always revisit it later if there’s a clear need from users.

For Vapor, where performance is a key focus, CSS Modules might actually be a better choice. Vite already has good support for them, so the implementation could be simpler and more efficient.

Native CSS @scope could be the ultimate solution, but browser support requirements are too high right now. The current implementation is designed for VDOM compatibility, but my implementation isn't great and has poor performance — this may need Evan‘s advice

edison1105 and others added 26 commits June 18, 2025 08:36

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…serts during non-hydration (#13220)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…sertionState (#13057)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… in `v-for` (#13187)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…preserved (#13009)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…on state (#13492)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…tate (#13041)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…y watching props (#13384)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…copeId
Base automatically changed from vapor to minor July 7, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants