svg-net / SVG

Fork of the ms svg library
http://svg-net.github.io/SVG/
Microsoft Public License
1.16k stars 474 forks source link

CSS Outline not working #1139

Open Inspirateur opened 8 months ago

Inspirateur commented 8 months ago

We're using this lib to export a user made SVG to PNG. In our app, we want the user to be able to put an outline around text and tried the following approach:

<svg xmlns='http://www.w3.org/2000/svg' width='80' height='55' viewBox='0 0 50 50'>
    <g>
        <text x='0' y='30' style='outline: solid 4px #000000; outline-offset: 4px;'>
            Text
        </text>
    </g>
</svg>

But it doesn't seem supported by this library (no outlines are displayed). Is it intended ?

paulushub commented 7 months ago

@Inspirateur Outline is part of the CSS Draft Level 4, right? As SVG-NET relies on ExCSS for CSS support, supporting new CSS styling might take time. This is not even supported in Inkscape yet. I think you would be better off with a CSS Level 3 styling for now.

Inspirateur commented 7 months ago

I see, well anyway I ended up exporting the svg using plain JS and it works so I no longer have this issue :p (but at least it's documented here for other users)