0.0
No commit activity in last 3 years
No release in over 3 years
Sprockets helpers for optimizing SVG graphics with svgo
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 10.0
 Project Readme

Sprockets SVGO

Sprockets helpers for optimizing SVG graphics with svgo.

Installing

Install svgo

# Globally
$ npm install -g svgo
# Or as a dependency
$ npm install -s svgo

Bundle

gem 'sprockets', '>= 3.0.0'
gem 'sprockets-svgo'

Using

With SASS

// icons.scss
.bold {
  background-image: svgo-data-uri("images/bold.svg");
}

With ERB

/* icons.css.erb */
.bold {
  background-image: url(<%= svgo_asset_data_uri("images/bold.svg") %>);
}

Licensed under the MIT License

© 2016 Javan Makhmali