Description
Version
3.0.7
Reproduction link
https://codesandbox.io/s/nice-bas-xpf2b?file=/src/components/HelloWorld.vue
Steps to reproduce
Open: https://codesandbox.io/s/nice-bas-xpf2b?file=/src/components/HelloWorld.vue
see that the same logic works different depended on compostion api or count of root element.
What is expected?
<style scoped>
.tst {
background: red;
}
</style>
background: red;
must never be applied to child component class
What is actually happening?
class .tst
applied to child components when:
- Child root component is only one
- Child root component is switched by v-if
- Child root component used composition API for adding second, third etc elements to DOM (in this case only FIRST element got
background: red;
)
scoped styles must never be applied to child compontens OR at least always (no matter it used composition api or have 2-3-5 root childs), we need clear login like "always works like this" or "newer works like this"
When used Composition api for SWITH (like v-if) - first DOM element will have background: red;
but second - no. Its extra strange because I have only 1 root element in one time (like v-if) but second elemen doest get style.