slidev
slidev copied to clipboard
Scoped style with > selector causes error
Describe the bug
Creating a slide with a style element using the > selector (e.g. p > a) causes an error.
Minimal reproduction
Steps to reproduce the behavior:
- Go to https://sli.dev/new
- Add the following to a slide:
<style>
p > a {}
</style>
- See the error
The error
[plugin:vite:vue] Tags with side effect (<script> and <style>) are ignored in client component templates.
Environment
- Slidev version: 0.49.29
- Browser: Firefox 118.0.1
- OS: Linux
Looks like an upstream bug... The transformation logic in Slidev is correct in test. However, I can't find a related issue/commit in https://github.com/unplugin/unplugin-vue-markdown or https://github.com/mdit-vue/mdit-vue