Skip to content

javan/sprockets-svgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published