autoprefixer-core
Advanced tools
Comparing version 3.1.2 to 4.0.0
@@ -0,1 +1,15 @@ | ||
## 4.0 “Indivisibiliter ac Inseparabiliter” | ||
* Become 2.5 times fatser by new PostCSS 3.0 parser. | ||
* Do not remove outdated prefixes by `remove: false` option. | ||
* `map.inline` and `map.sourcesContent` options are now `true` by default. | ||
* Add `box-decoration-break` support. | ||
* Do not add old `-webkit-` prefix for gradients with `px` units. | ||
* Use previous source map to show origin source of CSS syntax error. | ||
* Use `from` option from previous source map `file` field. | ||
* Set `to` value to `from` if `to` option is missing. | ||
* Trim Unicode BOM on source maps parsing. | ||
* Parse at-rules without spaces like `@import"file"`. | ||
* Better previous `sourceMappingURL` annotation comment cleaning. | ||
* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. | ||
## 3.1.2 | ||
@@ -2,0 +16,0 @@ * Update Firefox ESR version from 24 to 31. |
@@ -308,2 +308,8 @@ (function() { | ||
feature(require('caniuse-db/features-json/css-boxdecorationbreak'), function(brwsrs) { | ||
return prefix('box-decoration-break', { | ||
browsers: brwsrs | ||
}); | ||
}); | ||
}).call(this); |
@@ -44,3 +44,3 @@ (function() { | ||
prefixes = new Prefixes(autoprefixer.data.prefixes, browsers, options); | ||
return new Autoprefixer(prefixes, autoprefixer.data); | ||
return new Autoprefixer(prefixes, autoprefixer.data, options); | ||
}; | ||
@@ -70,3 +70,5 @@ | ||
Autoprefixer.prototype.postcss = function(css) { | ||
this.prefixes.processor.remove(css); | ||
if (this.options.remove !== false) { | ||
this.prefixes.processor.remove(css); | ||
} | ||
return this.prefixes.processor.add(css); | ||
@@ -73,0 +75,0 @@ }; |
@@ -38,3 +38,5 @@ (function() { | ||
if (prefix === '-webkit- old') { | ||
return _this.oldWebkit(value, args, params, after); | ||
if (args.indexOf('px') === -1) { | ||
return _this.oldWebkit(value, args, params, after); | ||
} | ||
} else { | ||
@@ -41,0 +43,0 @@ _this.convertDirection(params); |
@@ -23,3 +23,3 @@ (function() { | ||
index = rule.parent.index(rule) + 1; | ||
rules = rule.parent.rules; | ||
rules = rule.parent.childs; | ||
while (index < rules.length) { | ||
@@ -26,0 +26,0 @@ before = rules[index].selector; |
@@ -308,3 +308,3 @@ (function() { | ||
index = rule.index(decl); | ||
length = rule.decls.length; | ||
length = rule.childs.length; | ||
unprefixed = this.unprefixed(decl.prop); | ||
@@ -316,3 +316,3 @@ checker = (function(_this) { | ||
while (index >= 0 && index < length) { | ||
other = rule.decls[index]; | ||
other = rule.childs[index]; | ||
if (other.type === 'decl') { | ||
@@ -319,0 +319,0 @@ if (step === -1 && other.prop === unprefixed) { |
@@ -135,3 +135,3 @@ (function() { | ||
return node._autoprefixerDisabled; | ||
} else if (node.decls || node.rules) { | ||
} else if (node.childs) { | ||
status = void 0; | ||
@@ -138,0 +138,0 @@ node.each(function(i) { |
@@ -67,3 +67,3 @@ (function() { | ||
while (index >= 0) { | ||
before = rule.parent.rules[index]; | ||
before = rule.parent.childs[index]; | ||
if (before.type !== 'rule') { | ||
@@ -70,0 +70,0 @@ return false; |
@@ -45,3 +45,3 @@ (function() { | ||
} | ||
_ref = rule.decls; | ||
_ref = rule.childs; | ||
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
@@ -56,3 +56,3 @@ decl = _ref[_i]; | ||
} | ||
return rule.decls; | ||
return rule.childs; | ||
}; | ||
@@ -59,0 +59,0 @@ |
{ | ||
"name": "autoprefixer-core", | ||
"version": "3.1.2", | ||
"description": "CLI-less core of Autoprefixer to use in plugins", | ||
"keywords": ["autoprefixer", "css", "prefix", "postprocessor", "postcss"], | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/autoprefixer-core.git" | ||
}, | ||
"dependencies": { | ||
"caniuse-db": "^1.0.30000006", | ||
"postcss": "~2.2.5" | ||
}, | ||
"devDependencies": { | ||
"vinyl-source-stream": "1.0.0", | ||
"gulp-json-editor": "2.1.0", | ||
"jshint-stylish": "1.0.0", | ||
"gulp-replace": "0.4.0", | ||
"gulp-jshint": "1.8.5", | ||
"gulp-coffee": "2.2.0", | ||
"gulp-mocha": "1.1.1", | ||
"browserify": "6.1.0", | ||
"fs-extra": "0.12.0", | ||
"should": "4.0.4", | ||
"mocha": "1.21.5", | ||
"gulp": "3.8.8", | ||
"coffee-script": "1.8.0" | ||
}, | ||
"scripts": { | ||
"test": "gulp" | ||
}, | ||
"main": "lib/autoprefixer" | ||
"name": "autoprefixer-core", | ||
"version": "4.0.0", | ||
"description": "CLI-less core of Autoprefixer to use in plugins", | ||
"keywords": [ | ||
"autoprefixer", | ||
"css", | ||
"prefix", | ||
"postprocessor", | ||
"postcss" | ||
], | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/autoprefixer-core.git" | ||
}, | ||
"dependencies": { | ||
"caniuse-db": "^1.0.30000023", | ||
"postcss": "~3.0.1" | ||
}, | ||
"devDependencies": { | ||
"vinyl-source-stream": "1.0.0", | ||
"gulp-json-editor": "2.2.1", | ||
"jshint-stylish": "1.0.0", | ||
"gulp-replace": "0.5.0", | ||
"gulp-jshint": "1.9.0", | ||
"gulp-coffee": "2.2.0", | ||
"gulp-mocha": "1.1.1", | ||
"browserify": "6.3.2", | ||
"fs-extra": "0.12.0", | ||
"should": "4.3.0", | ||
"mocha": "2.0.1", | ||
"gulp": "3.8.10", | ||
"coffee-script": "1.8.0" | ||
}, | ||
"scripts": { | ||
"test": "gulp" | ||
}, | ||
"main": "lib/autoprefixer" | ||
} |
@@ -119,4 +119,4 @@ # Autoprefixer Core [![Build Status](https://travis-ci.org/postcss/autoprefixer-core.png)](https://travis-ci.org/postcss/autoprefixer-core) | ||
* `inline: true` to force inline map to CSS annotation comment. | ||
You can shortcut `map { inline: true }` to `map: 'inline'`. | ||
* `inline: false` to force save map to separated file, instead of inline it | ||
to CSS in special comment by base64. | ||
* `prev` (string or object): map content from previous processing step | ||
@@ -173,2 +173,17 @@ (like Sass compilation). | ||
## Cleaning | ||
By default, Autoprefixer not only add new prefixes, but also remove outdated. | ||
You can remove this behaviour by `remove: false` option: | ||
```js | ||
autoprefixer() | ||
.process('a { -webkit-border-radius: 2px; border-radius: 2px }'); | ||
// remove outdated -webkit-border-radius | ||
autoprefixer({ remove: false }) | ||
.process('a { -webkit-border-radius: 2px; border-radius: 2px }'); | ||
// keeps -webkit-border-radius | ||
``` | ||
## Debug | ||
@@ -175,0 +190,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129399
2962
195
+ Addedpostcss@3.0.7(transitive)
- Removedpostcss@2.2.6(transitive)
Updatedcaniuse-db@^1.0.30000023
Updatedpostcss@~3.0.1