Commit graph

10 commits

Author SHA1 Message Date
Will Charczuk
c1468e8ae4
Adds support for go mod (finally) (#164) 2020-11-22 16:45:10 -08:00
Justin Kromlinger
3cb33d48d3 Add ability to set custom stylesheets for SVG renderer (#105)
* Add ability to set custom stylesheets for SVG renderer

This allow to set custom inline CSS and a optional CSP nonce. This
solves the problem mentioned in #103 and is best used with it, as seen
in the added examples. Without this one would have to write a custom
renderer.

* Add note with link to the custom_stylesheets example
2018-10-12 09:43:30 -07:00
Justin Kromlinger
f97f94425f Add ability to set CSS classes instead of inline styles (#103)
* Add ability to set CSS classes instead of inline styles

This allows to set a `ClassName` field in `Style` structs. Setting this
field to anything but "" will cause all other styles to be ignored. The
element will then have a `class=` tag instead with the corresponding name.

Possible reasons to use this:
* Including multiple SVGs on the same webside, using the same styles
* Desire to use strict CSP headers

* Add warning that setting `ClassName` will drop all other inline styles
2018-10-11 17:21:46 -07:00
Will Charczuk
70e6cfddc5 fixing find and replace issue 2018-04-05 00:42:38 -07:00
Will Charczuk
df14434b6e changing assert 2018-04-05 00:36:12 -07:00
Will Charczuk
d84d6790c0 text options! 2016-07-29 16:36:29 -07:00
Will Charczuk
28f01842de slightly more rigorous bounds checking and auto-fit 2016-07-12 16:47:52 -07:00
Will Charczuk
debd56f494 bug fixes and refinements. 2016-07-11 23:32:31 -07:00
Will Charczuk
d0182ac2b4 fixing tests. 2016-07-11 00:27:02 -07:00
Will Charczuk
805f10a923 things. 2016-07-10 23:21:19 -07:00