Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

::backdrop pseudo-element support for inline SVG mode #313

Closed
yhatt opened this issue Oct 26, 2021 · 0 comments · Fixed by #319
Closed

::backdrop pseudo-element support for inline SVG mode #313

yhatt opened this issue Oct 26, 2021 · 0 comments · Fixed by #319
Labels
enhancement New feature or request

Comments

@yhatt
Copy link
Member

yhatt commented Oct 26, 2021

::backdrop pseudo-element can define styles for the background if in full-screen mode. This is helpful to change the color of letterboxes.

Marpit inline SVG mode is treating the parent <svg> element as the viewbox for scaling, so we can regard it as the backdrop of the slide element. Redirecting section::backdrop selector to the parent SVG will be useful for styling the letterbox.

/* @theme marpit-theme */

::backdrop {
  background: beige;
}

Related: marp-team/marp-cli#358, marp-team/marp#183

ToDo

  • Keep section::backdrop selector for an original usage
  • Consider how to handle classes for section in the parent SVG element
  • Take <style scoped> into account
  • Prevent chaining combinators from the ::backdrop selector to prevent circulate selector
@yhatt yhatt added the enhancement New feature or request label Oct 26, 2021
@yhatt yhatt moved this to Todo in Marp Roadmap Oct 26, 2021
@yhatt yhatt moved this from Todo to In Progress in Marp Roadmap Nov 19, 2021
Repository owner moved this from In Progress to Done ✅ in Marp Roadmap Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant