slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Scoped style with > selector causes error

Open lucascool12 opened this issue 1 year ago • 1 comments

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:

  1. Go to https://sli.dev/new
  2. Add the following to a slide:
<style>
p > a {}
</style>
  1. 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

lucascool12 avatar Oct 01 '24 12:10 lucascool12

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

kermanx avatar Oct 10 '24 04:10 kermanx