postcss-will-change
Advanced tools
Comparing version
14
index.js
@@ -1,5 +0,9 @@ | ||
module.exports = function (css) { | ||
css.eachDecl('will-change', function (decl) { | ||
decl.cloneBefore({ prop: 'backface-visibility', value: 'hidden' }); | ||
}); | ||
}; | ||
var postcss = require('postcss'); | ||
module.exports = postcss.plugin('postcss-will-change', function () { | ||
return function (css) { | ||
css.eachDecl('will-change', function (decl) { | ||
decl.cloneBefore({ prop: 'backface-visibility', value: 'hidden' }); | ||
}); | ||
}; | ||
}); |
{ | ||
"name": "postcss-will-change", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "PostCSS plugin to insert 3D hack before will-change property", | ||
"keywords": ["postcss", "css", "postcssplugin", "will-change", "fallback"], | ||
"keywords": ["postcss", "css", "postcss-plugin", "will-change", "fallback"], | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
@@ -13,11 +13,10 @@ "license": "MIT", | ||
"dependencies": { | ||
"postcss": "^4.0.3" | ||
"postcss": "^4.1.8" | ||
}, | ||
"devDependencies": { | ||
"jshint-stylish": "1.0.0", | ||
"gulp-jshint": "1.9.2", | ||
"gulp-mocha": "2.0.0", | ||
"mocha": "2.1.0", | ||
"chai": "1.10.0", | ||
"gulp": "3.8.11" | ||
"gulp-eslint": "0.11.1", | ||
"gulp-mocha": "2.0.1", | ||
"mocha": "2.2.4", | ||
"chai": "2.3.0", | ||
"gulp": "3.8.11" | ||
}, | ||
@@ -24,0 +23,0 @@ "scripts": { |
@@ -1,7 +0,11 @@ | ||
# PostCSS Will Change [](https://travis-ci.org/postcss/postcss-will-change) | ||
# PostCSS Will Change [![Build Status][ci-img]][ci] | ||
<img align="right" width="95" height="95" | ||
title="Philosopher’s stone, logo of PostCSS" | ||
src="http://postcss.github.io/postcss/logo.svg"> | ||
[PostCSS] plugin to insert 3D hack before will-change property. | ||
This plugin uses `backface-visibility` to has prevent overriding | ||
more popular `transform` property. | ||
more popular `transform` property. | ||
@@ -13,2 +17,4 @@ Use this plugin only before [Autoprefixer]. It will add vendor prefixes | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[ci-img]: https://travis-ci.org/postcss/postcss-will-change.svg | ||
[ci]: https://travis-ci.org/postcss/postcss-will-change | ||
@@ -15,0 +21,0 @@ ```css |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3788
31.39%5
-16.67%7
16.67%8
60%40
17.65%Updated