shiki
shiki copied to clipboard
[SVG] can't set background to a PowerPoint-compatible transparent
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.
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.