Open
Description
Description
Given SVG input file with CSS polyline{ fill: none; }; ellipse{ stroke:url(#colorForest); fill: none; stroke-width: 4; };
This code https://github.com/svg-net/SVG/blob/master/Source/SvgDocument.cs#L490
parses the CSS and returns 3! rules, even though there are only two.
First rule the polyline
Second rule the ellipse
Third rule Selector null
and Value null
, triggering a null reference exception at:
rule.Selector
https://github.com/svg-net/SVG/blob/master/Source/SvgDocument.cs#L499
Using this CSS: polyline{ fill: none; }; ellipse{ stroke:url(#colorForest); fill: none; stroke-width: 4; }
Fixes the issue. Its technically a problem with the ExCSS parser thing, and not SVG itself.
Example data
Used Versions
Running at commit c4e8316
from 20th jan 2021