elm-community / typed-svg

Typed SVG library written for Elm
BSD 3-Clause "New" or "Revised" License
59 stars 16 forks source link

Add support for CSS variables in `fill` and `stroke` #49

Closed francescortiz closed 3 years ago

francescortiz commented 3 years ago

I added support for css variables in fill and stroke. They should be applied everywhere, but this is the use case I faced and also the one mentioned in this issue:

https://github.com/elm-community/typed-svg/issues/39

rupertlssmith commented 3 years ago

Let me know if you urgently need a new version published with this - its a breaking change so will bump the major version.

rupertlssmith commented 3 years ago

Also worth noting, as discussed on issue #18, it can be worth documenting features that are not SVG 1.1. compliant. SVG in the browser is a mash-up of SVG 1.1 and CSS, so CSS features could potentially catch someone out who is trying to generate some SVG 1.1 compliant output (maybe to export the SVG to Inkscape for example).

The approach settled on in issue #18 is just to document these things, so maybe a note on the docs for type Paint to say that CSSVariable is not SVG 1.1 compliant could be nice?

francescortiz commented 3 years ago

Let me know if you urgently need a new version published with this - its a breaking change so will bump the major version.

No need to, thanks.

The approach settled on in issue #18 is just to document these things, so maybe a note on the docs for type Paint to say that CSSVariable is not SVG 1.1 compliant could be nice?

Agreed. I'll do that.