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

Command-line option to revert to pre-2.0 storing of CSS and JS as data URIs #4481

Open
noamross opened this issue Mar 22, 2018 · 5 comments
Open

Comments

@noamross
Copy link

As seen in #3423 and #4026, the best choice of inlining CSS and JS file vs. embedding them as data URIs differs depending on application. I was wondering if it would be possible to have a command-line flag to embed files as base64 data URIs rather than inlining.

In my case (ecohealthalliance/cites#2), script and style tags are much tougher to make work in the context of inserting HTML outputs into R documentation, where the syntax conflicts with CSS and JSS and elaborate pre-processing of lots of escape situations would be required.

@mb21
Copy link
Collaborator

mb21 commented Mar 22, 2018

I'm not too familiar with "R documentation", but shouldn't you always escape things properly anyway?

@jgm
Copy link
Owner

jgm commented Mar 22, 2018

@noamross is talking about the behavior of --self-contained, I assume.

@noamross
Copy link
Author

noamross commented Mar 22, 2018

@jgm Yes, that's correct.

@mb21 Of course. I may be able to pull it off, but I'm not sure the R documentation format, and the packages that auto-generate it from comments, can quite handle all layered nesting of escapes required. Based on the previous issues I would guess there are other conditions where having base64 is easier to handle.

@oloverm
Copy link

oloverm commented Feb 14, 2019

I'd also like this, just because it's easier to debug CSS in Chrome the old way than it is now. It's the difference between it letting you edit CSS as a separate file, or only in the context of a long parent HTML.

@jgm
Copy link
Owner

jgm commented Feb 14, 2019

I see the point of this. Maybe something like --always-data-uris?

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

No branches or pull requests

4 participants