README.md in inline_svg-0.4.0 vs README.md in inline_svg-0.5.0
- old
+ new
@@ -63,23 +63,27 @@
height: 5em;
}
```
## Options
+* `id`: set a ID attribute on the SVG
* `class`: set a CSS class attribute on the SVG
+* `data`: add data attributes to the SVG (supply as a hash)
* `size`: set width and height attributes on the SVG
+ * Can also be set using `height` and/or `width` attributes, which take
+ precedence over `size`
* Supplied as "{Width} * {Height}" or "{Number}", so "30px*45px" becomes `width="30px"`
and `height="45px"`, and "50%" becomes `width="50%"` and `height="50%"`
* `title`: add a \<title\> node inside the top level of the SVG document
* `desc`: add a \<desc\> node inside the top level of the SVG document
* `nocomment`: remove comment tags (and other unsafe/unknown tags) from svg
(uses the [Loofah](https://github.com/flavorjones/loofah) gem)
Example:
```
-inline_svg("some-document.svg", class: 'some-class', size: '30% * 20%', title: 'Some Title', desc:
-'Some interesting description', nocomment: true)
+inline_svg("some-document.svg", id: 'some-id', class: 'some-class', data: {some: "value"}, size: '30% * 20%', title: 'Some Title', desc:
+'Some description', nocomment: true)
```
## Contributing
1. Fork it ( [http://github.com/jamesmartin/inline_svg/fork](http://github.com/jamesmartin/inline_svg/fork) )