Closed
Description
here is how to reproduce:
Get an image
curl -o image.png https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/175px-Markdown-mark.svg.png
Include in CSS Property
---
title: "mwe"
header-includes: |
<style type="text/css">
body {
background-image: url(image.png)
}
</style>
---
# Title
Convert to self contained document
pandoc -t html --self-contained -s -o test.html test.md
Image is not embeded
> cat test.html | grep 'background-image'
background-image: url(image.png)
However, when included inside a CSS file
---
title: "mwe"
---
# Title
body {
background-image: url(image.png)
}
pandoc -t html --self-contained -s --css style.css -o test.html test.Rmd
$ cat test.html | grep 'background-image'
<style type="text/css">body {background-image: url(data:image/png;base64, <truncated>
Is this a known limitation ? Shouldn't <style>
be process the same as CSS file ?