slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
32.98k stars 1.34k forks source link

Scoped style with > selector causes error #1888

Open lucascool12 opened 1 week ago

lucascool12 commented 1 week ago

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>
  3. See the error
    The error
[plugin:vite:vue] Tags with side effect (<script> and <style>) are ignored in client component templates.

Environment

KermanX commented 4 days ago

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