[sfc] css in scoped pseudo-element is not handled #12241
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
scope: sfc
Vue version
latest
Link to minimal reproduction
https://play.vuejs.org/#eNp9Us1OwzAMfhUTDgU0rUJwGgUJEBJwAMRAXHKpWncrS+MoTmGo6rvjZOLnMO0Wfz/OZ8uDunRu+tGjmqmCK9+6AIyhdxfatp0jH2AAjw2M0HjqIBNppq22FVkO0PECziN/kN2iMQRv5E29lx1qW+SbdtJIioCdM2VAqQCK5TFUpmQ+16oh0upiGFKrcSzy5bFoivyfQUoOXwaBK3JYC5Ifwaul6/kcgi8tN9RhPYGakG0W4JP8CuAo13a/dA5mLR9M5ZvDIf5dkSE/k8j1mbZjbC7NJPUKmtZicgmQjNG0xZM0Ml2MJFnURAUJZpt2MX1nsrLIZNKqos61Bv2jC61sS6sZJCZypSzr8z5hwfc4+cGrJVarLfg7ryOm1ZNHRv+BWv1yofQLDBv6Zv6Aa3n/kh3VvRH1DvIZmUwfM25kV72tJfY/XUp7l86htYsXvlkHtPwzVAwalWPSayUncr1j9L+4J9PT5JOlqvEbS9HXeQ==
Steps to reproduce
What is expected?
Expected output
or
What is actually happening?
When vue style scoped is used with UnoCSS, and
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
The text was updated successfully, but these errors were encountered: