UNPKG

@marp-team/marpit

Version:

The skinny framework for creating slide deck from Markdown

54 lines (44 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _postcss = _interopRequireDefault(require("postcss")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** @module */ /** * Marpit PostCSS printable plugin. * * Make printable slide deck as PDF. * * @param {Object} opts * @param {string} opts.width * @param {string} opts.height * @alias module:postcss/printable */ const plugin = _postcss.default.plugin('marpit-postcss-printable', opts => css => css.first.before(` @page { size: ${opts.width} ${opts.height}; margin: 0; } @media print { html, body { margin: 0; page-break-inside: avoid; } section { page-break-before: always; } section, section * { -webkit-print-color-adjust: exact !important; color-adjust: exact !important; } :marpit-container > svg { display: block; height: 100vh; width: 100vw; } } `.trim())); var _default = plugin; exports.default = _default;