computed-style-to-inline-style icon indicating copy to clipboard operation
computed-style-to-inline-style copied to clipboard

Seems not to work for HTML inside SVG

Open spyro2000 opened this issue 2 years ago • 0 comments

For some reason, the library computes all styling for the SVG elements itself (like <g> etc.) but seems to exclude the embedded HTML elements (like <div>, <h1> and so on).

At least, that's what happens inside an angular component, even with ng-deep:: in place.

image

As a result, the HTML is rendered with styling in the browser, but the exported SVG has lost of its styling information.

EDIT: It's the same with a global stylesheet. All embedded HTML elements are ignored for some reason (there styling is not copied to the elements itself).

EDIT 2: Maybe it's just ignoring all <foreignObject>elements?

spyro2000 avatar Apr 26 '22 07:04 spyro2000