-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Self-contained CSS (and JS) should use style (and script) tags rather than data URIs #3423
Comments
Using style tags makes sense for CSS.
Using script tags makes sense for JS too (though we'd need
to decide what to do when it's zipped---that adds some
complexity).
This just affects Text.Pandoc.SelfContained.
|
OK, I've pushed a fix. This could use some extensive battle testing. |
I just installed from source; it seems to work as expected. Thanks! :-)
|
I've the impression that the current version of pandoc uses the old behavior again, that is embedding css file as data-uri rather than between By the way, I would have the same comment about SVG files that could be included as text in a self contained html. |
I'm not aware of any changes that might have caused this, and it's certainly not intended AFAIK. Please raise a new issue for this.
This is difficult for various reasons. E.g.: there is a semantic difference between |
|
At the moment, I have markdown files that need to be styled with
foo.css
. I run the command:This does work, but it embeds the CSS as a massive data URI included with a link tag, which prevents certain optimizations from occurring outside of pandoc. Instead,
foo.css
should be placed verbatim (or minified) into a<style>
tag, avoiding the data URI entirely.To work around this bug, I currently use:
This works as expected, but it is decidedly messier than it needs to be.
For text formats (as opposed to self-contained images and the like), is there a good reason to use data URIs?
The text was updated successfully, but these errors were encountered: