You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It means this generated CSS expects one or more elements between the .class and div (.class [data-v-7ba5bd90] > [data-v-7ba5bd90] instead of .class > [data-v-7ba5bd90]).
It causes a regression in specificity. Before, it had a specificity of 0-2-0, due to the parent class and the generated [data-v- attribute. Now, it has a specificity of 0-3-0 due to the additional second attribute.
Workaround
Use & > * instead of > *. This compiles into the following, which is semantically the same to what it was in Vue 3.5.14:
I've created #13405 for further discussion of how to handle trailing * selectors. The conversation is currently spread across various issues and PRs and I think it would be better to gather thoughts in one place.
Uh oh!
There was an error while loading. Please reload this page.
Vue version
3.5.15
Link to minimal reproduction
https://play.vuejs.org/#eNp9UctOwzAQ/BXLR1RSodJLCZEA9VAOgICjJZQ62zSt47X8CEVV/521Q0oPVX2w1jOj2dn1nj8Yk3UB+IznHlqjSg+F0IzlVdMxqUrn7gVfIQpOsPDCR6JYMLfGoCq2BLZUAfJxRKNgqPLxiR09nf9RwJxEA1USZmTK9r1nwa6GUvhlKbe1xaCra4kK7Sx1uOvpQ8xGVz5OhgUfcU+metXU2cahpjnIiDHBJbamUWBfjW9QO8FnsQWjI3ipFH4/J8zbAKMBl2uQ2zP4xu0iJvibBQe2A8GPnC9tDb6n5x8vsKP6SLZYBUXqC+Q7OFQhZuxljzQ4xT7RpbSL1qD1ja4/3XznQbthqBg0LSXpBafPfLow+n/cSXb7t8wDbfGrAxs9aYGTbJrdTPnhF3n+tDs=
Steps to reproduce
In the reproduction, toggle between 3.5.14 and 3.5.15 to see the different behavior.
What is expected?
The div should have a blue background
What is actually happening?
The div doesn't have a background applied.
System Info
Any additional comments?
When the following CSS is written:
It used to be compiled to the following, in Vue 3.5.14:
In Vue 3.5.15, it is compiled to this instead:
In practice, this results in two problems:
.class
anddiv
(.class [data-v-7ba5bd90] > [data-v-7ba5bd90]
instead of.class > [data-v-7ba5bd90]
).0-2-0
, due to the parent class and the generated[data-v-
attribute. Now, it has a specificity of0-3-0
due to the additional second attribute.Workaround
Use
& > *
instead of> *
. This compiles into the following, which is semantically the same to what it was in Vue 3.5.14:The difference in specificity remains though.
The text was updated successfully, but these errors were encountered: