Should "div :is(*)" in a scoped style block produce a different selector? #8800
Unanswered
kleinfreund
asked this question in
Help/Questions
Replies: 1 comment
-
:is 并不是实体选择器,是修饰选择器,对之前的补充,所以上面编译的没问题啊。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a scoped style block, the following:
... produces this CSS:
This is unexpected to me. The red and green examples make perfect sense, but especially considering how the green examples work, I expected the blue example to have the
data-v-*
attribute attached to the key part of the selector (i.e. preceding the:is
pseudo class) and not thediv
tag selector.Should
div :is(*)
producediv [data-v-1cb5f508]:is(*)
instead?Currently, this allows to break out of scoped styles. Consider the component to have a slot as a child of a
div
. Currently, the blue example will applycolor: blue
to all elements in this slot. I don't think that should be the case (i.e. I think this is a bug), but I'm unsure so I'm asking here instead of reporting an issue.Is there a reason why this should behave like it does today?
Notes:
div :pseudo-class
(e.g. you can swap out:is
for something else in the blue example and get similar results)Beta Was this translation helpful? Give feedback.
All reactions