marp-team / marp-cli

A CLI interface for Marp and Marpit based converters
MIT License
1.85k stars 105 forks source link

Transparent background does not work when outputting in png format #555

Closed 50Bytes-dev closed 10 months ago

50Bytes-dev commented 10 months ago

I'm trying to make the slide background transparent when exporting to png. it doesn't work.

section {
    background-color: transparent;
    width: 1920px;
    height: 1080px;
}

:root {
    background-color: transparent;
}
marp --theme custom.css test.md -o test.png
50Bytes-dev commented 10 months ago

Please add this solution for png https://stackoverflow.com/questions/55105958/puppeteer-saved-png-is-not-transparent

yhatt commented 10 months ago

https://github.com/marp-team/marp-cli/blob/49daf690f99bac192ba2bd5a4805bdabf296816d/src/converter.ts#L409

I've tried using omitBackground: true but it will not yet render PNG with transparency.