This issues tracks a first-party SVG implementation in `blitz-dom` and `blitz-paint`. ## Tasks - [ ] Enable SVG CSS properties in Stylo (this PR https://github.com/servo/stylo/pull/383 enables some of them) - [ ] Synthesize the CSS properties in the `synthesize_presentational_hints_for_legacy_attributes` https://github.com/DioxusLabs/blitz/blob/main/packages/blitz-dom/src/stylo.rs#L790 (like this PR does for Servo https://github.com/servo/servo/pull/45405/changes#diff-0c9e01a4915e7f3fa1e348d9047ffc3b145d41a4661d1f6b9211407aa8d59017R268) - [ ] Stop parsing inline SVGs with usvg here: https://github.com/DioxusLabs/blitz/blob/main/packages/blitz-dom/src/layout/construct.rs#L131. Instead we will likely want a custom processing pass, but you may be able to skip this for the initial implementation. (perhaps we could feature flag this at first so that people can choose between resvg and the first-party impl) - [ ] Add SVG rendering support to `blitz-paint`. This will likely work very similarly to `anyrender_svg` (https://github.com/DioxusLabs/anyrender/blob/main/crates/anyrender_svg/src/render.rs) but reading from the Blitz DOM and Stylo types rather than usvg types. ## SVG Elements - [ ] Core - [ ] [`<svg>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/svg) - [ ] [`<g>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g), - [ ] Reuse - [ ] [`<defs>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/defs) - [ ] [`<symbol>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/symbol) - [ ] [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/use) - [ ] Shapes - [ ] [`<rect>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/rect) - [ ] [`<circle>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/circle) - [ ] [`<ellipse>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/ellipse) - [ ] [`<line>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/line) - [ ] [`<polygon>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/polygon) - [ ] [`<polyline>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/polyline) - [ ] [`<path>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/path) - [ ] Paint servers - [ ] [`<linearGradient>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/linearGradient) - [ ] [`<radialGradient>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/radialGradient) - [ ] [`<pattern>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/pattern) - [ ] [`<marker>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/marker) - [ ] Clipping and Masking - [ ] [`<clipPath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/clipPath) - [ ] [`<mask>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/mask) - [ ] Text - [ ] [`<textPath>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/textPath) - [ ] [`<text>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/text) - [ ] [`<tspan>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/tspan) - [ ] [`<filter>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/filter) (and subelements) - [ ] Other - [ ] [`<foreignObject>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/foreignObject) - [ ] [`<view>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/view)
This issues tracks a first-party SVG implementation in
blitz-domandblitz-paint.Tasks
synthesize_presentational_hints_for_legacy_attributeshttps://github.com/DioxusLabs/blitz/blob/main/packages/blitz-dom/src/stylo.rs#L790 (like this PR does for Servo https://github.com/servo/servo/pull/45405/changes#diff-0c9e01a4915e7f3fa1e348d9047ffc3b145d41a4661d1f6b9211407aa8d59017R268)blitz-paint. This will likely work very similarly toanyrender_svg(https://github.com/DioxusLabs/anyrender/blob/main/crates/anyrender_svg/src/render.rs) but reading from the Blitz DOM and Stylo types rather than usvg types.SVG Elements
<svg><g>,<defs><symbol><use><rect><circle><ellipse><line><polygon><polyline><path><linearGradient><radialGradient><pattern><marker><clipPath><mask><textPath><text><tspan><filter>(and subelements)<foreignObject><view>