-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Description
Version
3.2.19
Reproduction link
Steps to reproduce
- Use Vue 3 with SFC and SASS
- Use
:deep
inside a nested block
<style scoped lang="scss">
:deep {
// more rules
}
:deep() {
// more rules
}
</style>
What is expected?
A clear definition in the manual, what is the correct way to do this.
I would expect the first syntax to work at least.
For the second syntax I would either expect the same, or a fitting error message, telling me, that this is not allowed.
What is actually happening?
https://v3.vuejs.org/api/sfc-style.html#style-scoped only has an easy example .a :deep(.b)
, but no nesting together with SASS.
The first syntax works, but brings up a misleading warn message
[@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use ::v-deep(<inner-selector>) instead.
I do not use the (legacy) ::v-deep
, but moved to the (new Vue3) :deep
.
The second syntax works as intended without any warning. However I am not sure, if this is intended by Vue.
Being not so deep into Vue and its modules and dependencies, I am not sure, whether this is a SASS thing, a Vue thing or whether you two have to figure this out together.
I just lost a few hours searching for an incompatible library, just ending up finding it's still a component of mine and the deprecation message mislead me totally. Hope, this bug report helps others :)
I read and understood, that you don't want to answer questions, but I think the question, whether :deep() { ... }
is the right way to go, should be answered (and put into the manual). Thank you! :)
Affected version:
I noticed it after upgrading from Vue 2 to 3.1.0, but the issue is also reproducible with latest 3.2.19 (see sandbox)