postcss/svg_backdrop

(constant) module:postcss/svg_backdrop

Marpit PostCSS SVG backdrop plugin.

Retarget ::backdrop and section::backdrop selector to @media screen { :marpit-container > svg[data-marpit-svg] { .. } }. It means ::backdrop targets the SVG container in inline SVG mode.

It's useful for setting style of the letterbox and pillarbox in the SVG scaled slide.

::backdrop {
  background-color: #448;
}

The original definition will remain to support an original usage of ::backdrop.

The important differences from an original ::backdrop are following:

  • In original spec, ::backdrop creates a separated layer from the target element, but Marpit's ::backdrop does not. The slide elements still become the child of ::backdrop so setting some properties that are inherited may make broken slide rendering.
  • Even if the browser is not fullscreen, ::backdrop will match to SVG container whenever matched to @media screen media query.

If concerned to conflict with the style provided by the app, consider to disable the selector support by inlineSVG: { backdropSelector: false }.

Source:
See: