postcss-will-change
Advanced tools
Comparing version
@@ -5,3 +5,3 @@ var postcss = require('postcss'); | ||
return function (css) { | ||
css.eachDecl('will-change', function (decl) { | ||
css.walkDecls('will-change', function (decl) { | ||
decl.cloneBefore({ prop: 'backface-visibility', value: 'hidden' }); | ||
@@ -8,0 +8,0 @@ }); |
{ | ||
"name": "postcss-will-change", | ||
"version": "0.2.0", | ||
"description": "PostCSS plugin to insert 3D hack before will-change property", | ||
"keywords": ["postcss", "css", "postcss-plugin", "will-change", "fallback"], | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-will-change.git" | ||
}, | ||
"dependencies": { | ||
"postcss": "^4.1.8" | ||
}, | ||
"devDependencies": { | ||
"gulp-eslint": "0.11.1", | ||
"gulp-mocha": "2.0.1", | ||
"mocha": "2.2.4", | ||
"chai": "2.3.0", | ||
"gulp": "3.8.11" | ||
}, | ||
"scripts": { | ||
"test": "gulp" | ||
} | ||
"name": "postcss-will-change", | ||
"version": "1.0.0", | ||
"description": "PostCSS plugin to insert 3D hack before will-change property", | ||
"keywords": [ | ||
"postcss", | ||
"css", | ||
"postcss-plugin", | ||
"will-change", | ||
"fallback" | ||
], | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-will-change.git" | ||
}, | ||
"dependencies": { | ||
"postcss": "^5.0.2" | ||
}, | ||
"devDependencies": { | ||
"gulp-eslint": "1.0.0", | ||
"gulp-mocha": "2.1.3", | ||
"mocha": "2.2.5", | ||
"chai": "3.2.0", | ||
"gulp": "3.9.0" | ||
}, | ||
"scripts": { | ||
"test": "gulp" | ||
} | ||
} |
@@ -7,7 +7,10 @@ # PostCSS Will Change [![Build Status][ci-img]][ci] | ||
[PostCSS] plugin to insert 3D hack before will-change property. | ||
[PostCSS] plugin to insert 3D hack before [will-change] property. | ||
This plugin uses `backface-visibility` to has prevent overriding | ||
more popular `transform` property. | ||
This plugin uses `backface-visibility` to force the browser to create a new layer. | ||
This is commonly done with `transform: translateZ(0)` and `transform: translate3d(0, 0, 0)`. | ||
`backface-visibility` is used here to avoid overriding the more popular transform property. | ||
These hacks are required for browsers that do not support `will-change`. | ||
Use this plugin only before [Autoprefixer]. It will add vendor prefixes | ||
@@ -17,2 +20,3 @@ to `backface-visibility`. | ||
[Autoprefixer]: https://github.com/postcss/autoprefixer | ||
[will-change]: https://dev.opera.com/articles/css-will-change-property/ | ||
[PostCSS]: https://github.com/postcss/postcss | ||
@@ -19,0 +23,0 @@ [ci-img]: https://travis-ci.org/postcss/postcss-will-change.svg |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8425
122.41%1
-50%44
10%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated