-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
fix(compiler-sfc): support global selector nesting #12416
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
expect(compileScoped(`.baz .qux ::v-global(.foo .bar) { color: red; }`)) | ||
.toMatchInlineSnapshot(` | ||
".foo .bar { color: red; | ||
".baz .qux[data-v-test] .foo .bar { color: red; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original behavior was that global
would ignore the preceding rules, but it will no longer do so after this PR. this will introduce some edge cases. see:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been experimenting with this and I'm wondering about some apparent inconsistencies in how selectors are handled. For example:
The background-color
is applied to some of the headings, but not others. It's not really clear to me what would be considered correct here, but I can't really justify the differences.
fix #12404
fix #12405