pleeease-filters
Advanced tools
Comparing version 0.1.2 to 0.1.3
15
index.js
@@ -454,6 +454,2 @@ var postcss = require('postcss'); | ||
} | ||
@@ -567,5 +563,5 @@ | ||
var properties = { | ||
filtersCSS: [], | ||
filtersSVG: [], | ||
filtersIE: [] | ||
filtersCSS: [], | ||
filtersSVG: [], | ||
filtersIE: [] | ||
}; | ||
@@ -601,3 +597,2 @@ | ||
} | ||
}); | ||
@@ -619,3 +614,3 @@ if (add) { | ||
var svgString = createSVG(properties.filtersSVG); | ||
var filtersSVG = 'url(\'data:image/svg+xml;utf8,' + svgString + '#filter\')'; | ||
var filtersSVG = 'url(\'data:image/svg+xml;charset=utf-8,' + svgString + '#filter\')'; | ||
@@ -646,5 +641,3 @@ // insert SVG filters, only if it's not already present | ||
Filter.prototype.process = function (css) { | ||
return postcss().use(this.postcss).process(css).css; | ||
}; | ||
@@ -651,0 +644,0 @@ |
{ | ||
"name": "pleeease-filters", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Convert CSS shorthand filters to SVG ones", | ||
@@ -5,0 +5,0 @@ "author": { |
Pleeease: filters | ||
================= | ||
Convert CSS shorthand filters to SVG equivalents. | ||
Convert CSS shorthand filters to SVG equivalent. | ||
@@ -27,2 +27,19 @@ Used by [Pleeease](https://github.com/iamvdo/pleeease), a CSS post-processor. | ||
##Filters | ||
It converts all 10 CSS shorthand filters: | ||
* grayscale | ||
* sepia | ||
* saturate | ||
* hue-rotate | ||
* invert | ||
* opacity | ||
* brightness | ||
* contrast | ||
* blur | ||
* drop-shadow | ||
Learn [more about CSS filters](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) | ||
##Usage | ||
@@ -79,2 +96,2 @@ | ||
This module is an adaptation of [CSS-Filters-Polyfill](https://github.com/Schepp/CSS-Filters-Polyfill). Copyright (c) 2012 - 2013 Christian Schepp Schaefer | ||
This module is an adaptation of [CSS-Filters-Polyfill](https://github.com/Schepp/CSS-Filters-Polyfill). Copyright (c) 2012 - 2013 Christian Schepp Schaefer |
Sorry, the diff of this file is not supported yet
18515
96