autoprefixer 6.7.6 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/CHANGELOG.md +23 -0
- package/README.md +10 -16
- package/data/prefixes.js +551 -517
- package/lib/at-rule.js +55 -38
- package/lib/autoprefixer.js +89 -63
- package/lib/brackets.js +59 -39
- package/lib/browsers.js +102 -65
- package/lib/declaration.js +212 -121
- package/lib/hacks/align-content.js +65 -38
- package/lib/hacks/align-items.js +62 -38
- package/lib/hacks/align-self.js +63 -36
- package/lib/hacks/appearance.js +42 -0
- package/lib/hacks/background-size.js +29 -20
- package/lib/hacks/block-logical.js +36 -21
- package/lib/hacks/border-image.js +26 -16
- package/lib/hacks/border-radius.js +60 -39
- package/lib/hacks/break-props.js +69 -44
- package/lib/hacks/cross-fade.js +40 -37
- package/lib/hacks/display-flex.js +81 -31
- package/lib/hacks/display-grid.js +29 -19
- package/lib/hacks/filter-value.js +66 -45
- package/lib/hacks/filter.js +26 -17
- package/lib/hacks/flex-basis.js +60 -30
- package/lib/hacks/flex-direction.js +85 -53
- package/lib/hacks/flex-flow.js +67 -49
- package/lib/hacks/flex-grow.js +45 -26
- package/lib/hacks/flex-shrink.js +60 -30
- package/lib/hacks/flex-spec.js +18 -8
- package/lib/hacks/flex-values.js +39 -20
- package/lib/hacks/flex-wrap.js +29 -20
- package/lib/hacks/flex.js +68 -43
- package/lib/hacks/fullscreen.js +31 -21
- package/lib/hacks/gradient.js +462 -302
- package/lib/hacks/grid-column-align.js +55 -0
- package/lib/hacks/grid-end.js +53 -28
- package/lib/hacks/grid-row-align.js +39 -19
- package/lib/hacks/grid-start.js +80 -48
- package/lib/hacks/grid-template.js +91 -55
- package/lib/hacks/image-rendering.js +63 -33
- package/lib/hacks/image-set.js +28 -20
- package/lib/hacks/inline-logical.js +32 -17
- package/lib/hacks/intrinsic.js +66 -0
- package/lib/hacks/justify-content.js +69 -42
- package/lib/hacks/mask-border.js +36 -21
- package/lib/hacks/order.js +58 -35
- package/lib/hacks/pixelated.js +44 -30
- package/lib/hacks/placeholder.js +40 -25
- package/lib/hacks/text-emphasis-position.js +27 -20
- package/lib/hacks/transform-decl.js +94 -52
- package/lib/hacks/writing-mode.js +37 -27
- package/lib/info.js +117 -78
- package/lib/old-selector.js +84 -58
- package/lib/old-value.js +22 -20
- package/lib/prefixer.js +164 -95
- package/lib/prefixes.js +446 -351
- package/lib/processor.js +394 -278
- package/lib/resolution.js +135 -75
- package/lib/selector.js +145 -84
- package/lib/supports.js +330 -210
- package/lib/transition.js +396 -243
- package/lib/utils.js +84 -48
- package/lib/value.js +118 -80
- package/package.json +54 -14
- package/lib/hacks/justify-items.js +0 -31
- package/lib/hacks/stretch.js +0 -45
package/lib/hacks/flex-wrap.js
CHANGED
|
@@ -1,33 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
var Declaration, FlexWrap, flexSpec,
|
|
3
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
4
|
-
hasProp = {}.hasOwnProperty;
|
|
1
|
+
'use strict';
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
8
|
+
|
|
9
|
+
var flexSpec = require('./flex-spec');
|
|
10
|
+
var Declaration = require('../declaration');
|
|
11
|
+
|
|
12
|
+
var FlexWrap = function (_Declaration) {
|
|
13
|
+
_inherits(FlexWrap, _Declaration);
|
|
12
14
|
|
|
13
15
|
function FlexWrap() {
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
+
_classCallCheck(this, FlexWrap);
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
|
19
|
+
}
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Don't add prefix for 2009 spec
|
|
23
|
+
*/
|
|
24
|
+
FlexWrap.prototype.set = function set(decl, prefix) {
|
|
25
|
+
var spec = flexSpec(prefix)[0];
|
|
26
|
+
if (spec !== 2009) {
|
|
27
|
+
return _Declaration.prototype.set.call(this, decl, prefix);
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
return FlexWrap;
|
|
33
|
+
}(Declaration);
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
Object.defineProperty(FlexWrap, 'names', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: ['flex-wrap']
|
|
39
|
+
});
|
|
30
40
|
|
|
31
|
-
module.exports = FlexWrap;
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
module.exports = FlexWrap;
|
package/lib/hacks/flex.js
CHANGED
|
@@ -1,64 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
var Declaration, Flex, flexSpec, list,
|
|
3
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
4
|
-
hasProp = {}.hasOwnProperty;
|
|
1
|
+
'use strict';
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var flexSpec = require('./flex-spec');
|
|
10
|
+
var Declaration = require('../declaration');
|
|
11
|
+
|
|
12
|
+
var list = require('postcss/lib/list');
|
|
13
|
+
|
|
14
|
+
var Flex = function (_Declaration) {
|
|
15
|
+
_inherits(Flex, _Declaration);
|
|
14
16
|
|
|
15
17
|
function Flex() {
|
|
16
|
-
|
|
18
|
+
_classCallCheck(this, Flex);
|
|
19
|
+
|
|
20
|
+
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
|
17
21
|
}
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Change property name for 2009 spec
|
|
25
|
+
*/
|
|
26
|
+
Flex.prototype.prefixed = function prefixed(prop, prefix) {
|
|
27
|
+
var spec = void 0;
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
var _flexSpec = flexSpec(prefix);
|
|
30
|
+
|
|
31
|
+
spec = _flexSpec[0];
|
|
32
|
+
prefix = _flexSpec[1];
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} else {
|
|
32
|
-
return Flex.__super__.prefixed.apply(this, arguments);
|
|
33
|
-
}
|
|
34
|
+
if (spec === 2009) {
|
|
35
|
+
return prefix + 'box-flex';
|
|
36
|
+
} else {
|
|
37
|
+
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
38
|
+
}
|
|
34
39
|
};
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Return property name by final spec
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Flex.prototype.normalize = function normalize() {
|
|
47
|
+
return 'flex';
|
|
38
48
|
};
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Spec 2009 supports only first argument
|
|
52
|
+
* Spec 2012 disallows unitless basis
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Flex.prototype.set = function set(decl, prefix) {
|
|
57
|
+
var spec = flexSpec(prefix)[0];
|
|
58
|
+
if (spec === 2009) {
|
|
59
|
+
decl.value = list.space(decl.value)[0];
|
|
60
|
+
decl.value = Flex.oldValues[decl.value] || decl.value;
|
|
61
|
+
return _Declaration.prototype.set.call(this, decl, prefix);
|
|
62
|
+
} else if (spec === 2012) {
|
|
63
|
+
var components = list.space(decl.value);
|
|
64
|
+
if (components.length === 3 && components[2] === '0') {
|
|
65
|
+
decl.value = components.slice(0, 2).concat('0px').join(' ');
|
|
66
|
+
}
|
|
51
67
|
}
|
|
52
|
-
return
|
|
53
|
-
} else {
|
|
54
|
-
return Flex.__super__.set.apply(this, arguments);
|
|
55
|
-
}
|
|
68
|
+
return _Declaration.prototype.set.call(this, decl, prefix);
|
|
56
69
|
};
|
|
57
70
|
|
|
58
71
|
return Flex;
|
|
72
|
+
}(Declaration);
|
|
59
73
|
|
|
60
|
-
|
|
74
|
+
Object.defineProperty(Flex, 'names', {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value: ['flex', 'box-flex']
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(Flex, 'oldValues', {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
value: {
|
|
83
|
+
auto: '1',
|
|
84
|
+
none: '0'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
61
87
|
|
|
62
|
-
module.exports = Flex;
|
|
63
88
|
|
|
64
|
-
|
|
89
|
+
module.exports = Flex;
|
package/lib/hacks/fullscreen.js
CHANGED
|
@@ -1,33 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
var Fullscreen, Selector,
|
|
3
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
4
|
-
hasProp = {}.hasOwnProperty;
|
|
1
|
+
'use strict';
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
6
|
+
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
8
|
+
|
|
9
|
+
var Selector = require('../selector');
|
|
10
|
+
|
|
11
|
+
var Fullscreen = function (_Selector) {
|
|
12
|
+
_inherits(Fullscreen, _Selector);
|
|
10
13
|
|
|
11
14
|
function Fullscreen() {
|
|
12
|
-
|
|
13
|
-
}
|
|
15
|
+
_classCallCheck(this, Fullscreen);
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
return _possibleConstructorReturn(this, _Selector.apply(this, arguments));
|
|
18
|
+
}
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Return different selectors depend on prefix
|
|
22
|
+
*/
|
|
23
|
+
Fullscreen.prototype.prefixed = function prefixed(prefix) {
|
|
24
|
+
if (prefix === '-webkit-') {
|
|
25
|
+
return ':-webkit-full-screen';
|
|
26
|
+
} else if (prefix === '-moz-') {
|
|
27
|
+
return ':-moz-full-screen';
|
|
28
|
+
} else {
|
|
29
|
+
return ':' + prefix + 'fullscreen';
|
|
30
|
+
}
|
|
25
31
|
};
|
|
26
32
|
|
|
27
33
|
return Fullscreen;
|
|
34
|
+
}(Selector);
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
Object.defineProperty(Fullscreen, 'names', {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: [':fullscreen']
|
|
40
|
+
});
|
|
30
41
|
|
|
31
|
-
module.exports = Fullscreen;
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
module.exports = Fullscreen;
|