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

Paged.js specifications not supported in inline CSS chunks #309

Open
lgaborini opened this issue Mar 9, 2023 · 1 comment
Open

Paged.js specifications not supported in inline CSS chunks #309

lgaborini opened this issue Mar 9, 2023 · 1 comment

Comments

@lgaborini
Copy link

lgaborini commented Mar 9, 2023

It seems that {pagedown} does not compile the Paged.js directives (like @page) when included in a Rmd CSS chunk.
Is it by design?

No issues is the CSS is externally included with the css parameter of pagedown::html_paged(), or if the generated Paged.js classes are used in place of all directives (e.g. .pagedjs_page instead of @page).

Reprex

Using pagedown 0.20, R 4.2.2

@cderv
Copy link
Collaborator

cderv commented Mar 9, 2023

Not sure if this is by design or not but one important difference is that

  • When css is used in YAML, it will be added as a node in <head>
  • When using the CSS engine, the content will be inlined inside the HTML document body using <style>

It is highly possible that paged.js process only the CSS from <link> and not the inline css - or that @page instruction can't work from <style> instruction in <body>

We'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants