You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using scoped styles and nested css the child combinator (>) is sometimes lost when transpiling the css for browsers without support for nested css.
Vue version
3.4.24
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-uflhun?file=vite.config.js,src%2FApp.vue&terminal=dev
Steps to reproduce
npm run dev
npm run build
andnpm run preview
Please note the defined target browser version in the vite.config.js
What is expected?
Only the first two spans are colored in every case. The transpiled css works the same as the original css.
What is actually happening?
All three spans are colored as the transpiled css looses the child combinator (>) used in
:deep(.foo:has(> span))
.System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm npmPackages: vue: ^3.4.37 => 3.4.37 pnpm: 8.15.6 - /usr/local/bin/pnpm System: OS: macOS 14.5 Browsers: Chrome: 127.0.6533.100
Any additional comments?
When using scoped styles and nested css the child combinator (>) is sometimes lost when transpiling the css for browsers without support for nested css.
is wrongly converted into
instead of the correct
As far as my testing has gone this only happens when
:deep(&)
is used in the nested part of the css.The text was updated successfully, but these errors were encountered: