exupero / saveSvgAsPng

Save SVGs as PNGs from the browser.
MIT License
1.09k stars 362 forks source link

saveSvgAsPng without css styleSheets, modifyCss dosen`t work, who can tell me how to use modifyCss #233

Closed zhfneu closed 4 years ago

zhfneu commented 4 years ago

I want to export d3 graph with saveSvgasPng,but without css style

peteruithoven commented 4 years ago

@zhfneu any change you can improve the spelling of your title? Maybe shorten it a bit and put some of it in the message?

peteruithoven commented 4 years ago

Looks like functions like modifyCss, selectorRemap, modifyStyle are only called for css rules for which the elements can be found in the svg. https://github.com/exupero/saveSvgAsPng/blob/be2bb9c63e5abfc219d02389dcaa5fc2e2b763c9/src/saveSvgAsPng.js#L207