Related plugins
Describe the bug
:deep(.foo) {
&:hover,
&:focus,
&:focus-within {
.bar {
color: red;
}
}
}
when css.transformer is set to lightningcss, this is getting compiled to:
:is(:deep(.foo):hover,:deep(.foo):focus,:deep(.foo):focus-within) .bar[data-v-4089b056]{color:red}
with postcss:
:is([data-v-4089b056] .foo:hover,[data-v-4089b056] .foo:focus,[data-v-4089b056] .foo:focus-within) .bar{color:red}
Reproduction
https://stackblitz.com/edit/vitejs-vite-3kuur5ua?file=src/App.vue,vite.config.ts
Steps to reproduce
- Hover on the button in preview. The color doesn't change.
- Comment out
transformer: 'lightningcss' in vite.config.ts and save.
- Hover on the button in preview. The color changes to red.
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: 22.22.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@vitejs/plugin-vue: ^6.0.5 => 6.0.6
vite: ^8.0.8 => 8.0.8
Used Package Manager
npm
Logs
No response
Validations
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
when css.transformer is set to lightningcss, this is getting compiled to:
with postcss:
Reproduction
https://stackblitz.com/edit/vitejs-vite-3kuur5ua?file=src/App.vue,vite.config.ts
Steps to reproduce
transformer: 'lightningcss'in vite.config.ts and save.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: 22.22.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: @vitejs/plugin-vue: ^6.0.5 => 6.0.6 vite: ^8.0.8 => 8.0.8Used Package Manager
npm
Logs
No response
Validations