![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
pleeease-filters
Advanced tools
Readme
Convert CSS shorthand filters to SVG equivalent.
Used by Pleeease, a CSS post-processor.
Try it by yourself in the Pleeease playground
##Example
You write foo.css
:
.blur {
filter: blur(4px);
}
You get bar.css
:
.blur {
filter: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="4" /></filter></svg>#filter');
filter: blur(4px);
}
##Filters
It converts all 10 CSS shorthand filters:
Learn more about CSS filters
##Prefixes
This tool doesn't add prefixes. If you want them, you should use Autoprefixer. This is what Pleeease does:
.blur {
filter: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="4" /></filter></svg>#filter');
-webkit-filter: blur(4px);
filter: blur(4px);
}
##Usage
$ npm install pleeease-filters
var filters = require('pleeease-filters'),
fs = require('fs');
var css = fs.readFileSync('app.css', 'utf8');
// define options here
var options = {};
var fixed = filters.process(css, options);
fs.writeFile('app.min.css', fixed, function (err) {
if (err) {
throw err;
}
console.log('File saved!');
});
##Options
You can also add IE filters with an option:
// set options
var options = {
oldIE: true
}
Using the first example, you'll get:
.blur {
filter: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="4" /></filter></svg>#filter');
filter: blur(4px);
filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=4);
}
##Note
Be careful, not all browsers support CSS or SVG filters on HTML content:
It means that IE10+, Opera Mini and Android browsers have no support at all on HTML, only in SVG.
Moreover, IE filters shouldn't be used.
See caniuse for more info.
##Licence
MIT © 2014 Vincent De Oliveira · iamvdo
This module is an adaptation of CSS-Filters-Polyfill. Copyright (c) 2012 - 2013 Christian Schepp Schaefer
FAQs
Convert CSS shorthand filters to SVG ones
The npm package pleeease-filters receives a total of 107,910 weekly downloads. As such, pleeease-filters popularity was classified as popular.
We found that pleeease-filters demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.