No commit activity in last 3 years
No release in over 3 years
Adds inline_svg as a Sass function.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
= 0.17.1

Runtime

~> 2.0
 Project Readme

sassс-inline-svg

Gem Version Build Status Maintainability Test Coverage

Inline url-encoded SVG with Sassc. Optional variable string replacement included!

Inspired by https://github.com/franzheidl/sass-inline-svg

Installation

gem install sassc-inline-svg

Add this line to your application's Gemfile:

gem 'sassc-inline-svg'

Usage

Sassc-inline-svg adds a inline_svg function you can use with Sass. It url-encodes the contents of the specified file and inlines it in your CSS (Url-encoded SVG is about 30% smaller than base64).

.block {
  background: #0e4573 inline_svg('example.svg', (fillcolor: '#23b3e8')) no-repeat;
}