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

Scoped style escape case #10548

Closed
cuishuo0102 opened this issue Mar 19, 2024 · 0 comments · Fixed by #10551
Closed

Scoped style escape case #10548

cuishuo0102 opened this issue Mar 19, 2024 · 0 comments · Fixed by #10551
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working scope: compiler scope: sfc

Comments

@cuishuo0102
Copy link

Vue version

3.4.19

Link to minimal reproduction

https://play.vuejs.org/#eNqdUsFKAzEQ/ZUQhIKUXaperKug0oMeVNRjQNbdaU3NJiHJrpXSf3cm6a6K1YO3zHtvhjfzsubn1mZdC3zKC185aQPzEFp7JrRsrHGBXZrG7k3Y3JmGjbKcSmoYnQgtdJGnJpRjEaCxqgyAFWNFLTtWqdL7U8Er7BI84shsR+ZJl6MQX0U+tPMxD74yei4X2dIbjebWJE1zpAJ3a4M02gs+ZZEhrlTKvF1HLLgWxj1evUD1ugNf+hVhgt858OA6EHzgQukWEBI9e7iBFb4HsjF1q1D9B3kP3qiWPCbZRatrtP1FF91exRNLvXj0s1UA7fulyCgpN1EvOB6cjvbb6p92D7Oj2Cf0Bq/Yh/Uj3X/lJlE32UZImVF90Me3M8g43Yd3BQzztFAjktHMZL0yyrgpc1DjZ0LLPbn/jX5WLSQeXdMs+h9PHTi6Fm6GK2eTY775AIhg7Bc=

Steps to reproduce

  1. create a new component which root node has a class name and a child
  2. create a css rule for that class, and create a .class > * rule for its descendants
  3. use that component in a component, with an ancestor who has the same class name with that component's root node
  4. the style of the node is effected by the rules which mean to take effects on its descendants because the existence of a class name out of the scope

What is expected?

.class-name[data-v-hash] {
 ...
}

.class-name[data-v-hash] * {
...
}

What is actually happening?

.class-name[data-v-hash] {
 ...
}

.class-name *[data-v-hash] {
...
}

System Info

No response

Any additional comments?

No response

Doctor-wu added a commit to Doctor-wu/core that referenced this issue Mar 20, 2024
@haoqunjiang haoqunjiang added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Mar 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
lynxlangya pushed a commit to lynxlangya/core that referenced this issue May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working scope: compiler scope: sfc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants