slidev
slidev copied to clipboard
CSS child combinator throws error
Describe the bug
If you use a child combinator (>) in an embedded <style> tag, the app immediately throws error and stops. I guess the parser thinks of it as a stray closing tag?
To Reproduce Steps to reproduce the behavior:
yarn create slidev .- directly start with the starter template
- for example, edit the line 73 from
h1toh1 > spanin slides.md https://github.com/slidevjs/slidev/blob/d81b650a3e4fe196e1f49dbad50807431077e558/demo/starter/slides.md#L73 - See the error
[plugin:vite:vue] Tags with side effect (<script> and <style>) are ignored in client component templates.
/@slidev/slides/2.md:21:1
19 | Learn more: https://sli.dev/guide/syntax#embedded-styles
20 | -->
21 | <style scoped>
| ^
22 |
23 | h1 > span {
AFAIK it never fails without child combinators, nor via external CSS such as in style.css.
Desktop (please complete the following information):
- OS: Ubuntu 20.04 (WSL 1)
- Browser: N/A
- Slidev version: 0.28.1
Is there a workaround for this problem? I'd like to be able to use child combinators in embedded styles.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still reproduces as of v0.36.10.
It sounds like stalebot shouldn't have closed this.