shiki icon indicating copy to clipboard operation
shiki copied to clipboard

[SVG] can't set background to a PowerPoint-compatible transparent

Open yume-chan opened this issue 2 years ago • 0 comments

I want to insert SVGs generated by shiki and shiki-renderer-svg to PowerPoint, while having a transparent background, but it doesn't work, the background is always black.

image

Old SVG standard doesn't support all CSS color features, I tried setting bg option to transparent, rgba(0,0,0,0) or #00000000, seems like PowerPoint supports none of them.

I tried manually edit the SVG file, fill-opacity properties works, and deleting the whole rect#bg works.

Maybe it need an extra option like bgOpacity, or be capable of parsing CSS colors and generating in a legacy-compatible way.

yume-chan avatar Dec 14 '21 09:12 yume-chan