[style] SFC中style lang=less 时,& > :global(name) { } 不符合预期
Vue version
3
Link to minimal reproduction
https://codesandbox.io/p/sandbox/elastic-sound-ogh86y?file=%2Fsrc%2FApp.vue
Steps to reproduce
<template>
<div class="container">
<h1 class="h1">Hello {{ msg }}</h1>
</div>
</template>
<script setup lang="ts">
import { ref } from "vue";
const msg = ref<string>("World");
</script>
<style scoped lang="less">
.container {
background: red;
& > :global(.h1) {
color: white;
}
}
</style>
What is expected?
.container[data-v-7a7a37b1] {
background: red;
}
.container[data-v-7a7a37b1] .h1{
color: white;
}
What is actually happening?
.container[data-v-7a7a37b1] {
background: red;
}
.h1 {
color: white;
}
System Info
No response
Any additional comments?
No response