marp-team / marpit

The skinny framework for creating slide deck from Markdown
https://marpit.marp.app/
MIT License
964 stars 46 forks source link

Scoped style does not apply to pseudo layers in advanced background #328

Closed yhatt closed 2 years ago

yhatt commented 2 years ago

Whenever using ![bg]() syntax in advanced background mode, section::before and section::after selectors by setting <style scoped> will not work due to lacked attribute for scoping in <section> element for the pseudo layer.

<!-- paginate: true -->

<style scoped>
section::after {
  color: red;
}
</style>

---

![bg](https://marp.app/assets/hero-background.svg)

<style scoped>
section::after {
  color: red;
}
</style>

In this Markdown, a page number of the second slide will not turn the color to red if enabled advanced background through new Marpit({ inlineSVG: true }).