DOMNormalisation has skipAttributes where the style attribute is intended to be skipped over (config.js), i.e., not preserved once the node tree is dumped (dumpNode in doc.js). Rationale being that inline style in HTML should be moved to external or internal styles.
That's generally okay but a bit strict for HTML nodes. It is also common to see inline style attribute in SVG trees. So, when SVG is embedded in HTML, and when the HTML document is passed through dumpNode, these styles are also stripped - not preserved.
Consider whether to remove style from skipping or introduce cases where it may be allowed, e.g., if style is used in a node that has svg as ancestor element.
DOMNormalisation
hasskipAttributes
where thestyle
attribute is intended to be skipped over (config.js), i.e., not preserved once the node tree is dumped (dumpNode
in doc.js). Rationale being that inlinestyle
in HTML should be moved to external or internal styles.That's generally okay but a bit strict for HTML nodes. It is also common to see inline
style
attribute in SVG trees. So, when SVG is embedded in HTML, and when the HTML document is passed through dumpNode, these styles are also stripped - not preserved.Consider whether to remove
style
from skipping or introduce cases where it may be allowed, e.g., ifstyle
is used in a node that hassvg
as ancestor element.