Open
Description
Vue version
latest
Link to minimal reproduction
Steps to reproduce
- Open playground, see not work
- And toggle another css block, see work fine
What is expected?
Expected output
#app :is(.foo[data-v-xxx]){
color: red;
}
or
#app[data-v-app] :is(.foo){
color: red;
}
What is actually happening?
When vue style scoped is used with UnoCSS, and
presetUno({
important: '#app',
})
is enabled, the unocss transformer will add a default prefix of #app
to the css. Since #app
is a special keyword, vue does not handle it specially. In style scoped mode, the elements in the pseudo-element are not hashed.
There is a minimal reproduction with UnoCSS https://stackblitz.com/edit/vitejs-vite-yzjmbw?file=src%2FApp.vue
System Info
No response
Any additional comments?
No response