Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/javan/sprockets-svgo
https://github.com/javan/sprockets-svgo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/javan/sprockets-svgo
- Owner: javan
- License: mit
- Created: 2016-11-28T16:59:08.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2021-01-20T18:19:31.000Z (almost 4 years ago)
- Last Synced: 2024-09-14T07:13:53.400Z (2 months ago)
- Language: Ruby
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sprockets SVGO
[Sprockets](https://github.com/rails/sprockets) helpers for optimizing SVG graphics with [svgo](https://github.com/svg/svgo).
## Installing
Install svgo
```sh
# Globally
$ npm install -g svgo
# Or as a dependency
$ npm install -s svgo
```
Bundle
```ruby
gem 'sprockets', '>= 3.0.0'
gem 'sprockets-svgo'
```## Using
With SASS
```scss
// icons.scss
.bold {
background-image: svgo-data-uri("images/bold.svg");
}
```
With ERB
```css
/* icons.css.erb */
.bold {
background-image: url(<%= svgo_asset_data_uri("images/bold.svg") %>);
}
```---
Licensed under the [MIT License](LICENSE.txt)
© 2016 Javan Makhmali