autoprefixer 9.8.7 → 10.0.2
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/CHANGELOG.md +999 -0
- package/README.md +0 -3
- package/bin/autoprefixer +11 -11
- package/data/prefixes.js +799 -545
- package/lib/at-rule.js +23 -50
- package/lib/autoprefixer.js +108 -97
- package/lib/brackets.js +31 -44
- package/lib/browsers.js +54 -71
- package/lib/declaration.js +122 -178
- package/lib/hacks/align-content.js +24 -54
- package/lib/hacks/align-items.js +23 -53
- package/lib/hacks/align-self.js +32 -60
- package/lib/hacks/animation.js +11 -29
- package/lib/hacks/appearance.js +19 -35
- package/lib/hacks/backdrop-filter.js +16 -31
- package/lib/hacks/background-clip.js +19 -36
- package/lib/hacks/background-size.js +16 -31
- package/lib/hacks/block-logical.js +28 -36
- package/lib/hacks/border-image.js +9 -27
- package/lib/hacks/border-radius.js +22 -44
- package/lib/hacks/break-props.js +38 -51
- package/lib/hacks/color-adjust.js +11 -30
- package/lib/hacks/cross-fade.js +29 -48
- package/lib/hacks/display-flex.js +32 -61
- package/lib/hacks/display-grid.js +12 -32
- package/lib/hacks/filter-value.js +8 -25
- package/lib/hacks/filter.js +13 -27
- package/lib/hacks/flex-basis.js +21 -54
- package/lib/hacks/flex-direction.js +41 -77
- package/lib/hacks/flex-flow.js +33 -61
- package/lib/hacks/flex-grow.js +16 -43
- package/lib/hacks/flex-shrink.js +21 -54
- package/lib/hacks/flex-spec.js +7 -10
- package/lib/hacks/flex-wrap.js +11 -32
- package/lib/hacks/flex.js +27 -58
- package/lib/hacks/fullscreen.js +10 -30
- package/lib/hacks/gradient.js +240 -330
- package/lib/hacks/grid-area.js +25 -43
- package/lib/hacks/grid-column-align.js +14 -34
- package/lib/hacks/grid-end.js +30 -45
- package/lib/hacks/grid-row-align.js +14 -34
- package/lib/hacks/grid-row-column.js +20 -39
- package/lib/hacks/grid-rows-columns.js +75 -99
- package/lib/hacks/grid-start.js +17 -39
- package/lib/hacks/grid-template-areas.js +59 -76
- package/lib/hacks/grid-template.js +40 -61
- package/lib/hacks/grid-utils.js +686 -716
- package/lib/hacks/image-rendering.js +24 -47
- package/lib/hacks/image-set.js +10 -30
- package/lib/hacks/inline-logical.js +26 -32
- package/lib/hacks/intrinsic.js +40 -53
- package/lib/hacks/justify-content.js +26 -57
- package/lib/hacks/mask-border.js +28 -36
- package/lib/hacks/mask-composite.js +41 -57
- package/lib/hacks/order.js +22 -52
- package/lib/hacks/overscroll-behavior.js +16 -37
- package/lib/hacks/pixelated.js +16 -40
- package/lib/hacks/place-self.js +18 -41
- package/lib/hacks/placeholder-shown.js +9 -28
- package/lib/hacks/placeholder.js +15 -38
- package/lib/hacks/text-decoration-skip-ink.js +14 -29
- package/lib/hacks/text-decoration.js +20 -31
- package/lib/hacks/text-emphasis-position.js +9 -28
- package/lib/hacks/transform-decl.js +43 -69
- package/lib/hacks/user-select.js +19 -27
- package/lib/hacks/writing-mode.js +19 -36
- package/lib/info.js +63 -93
- package/lib/old-selector.js +39 -60
- package/lib/old-value.js +17 -25
- package/lib/prefixer.js +83 -110
- package/lib/prefixes.js +233 -336
- package/lib/processor.js +420 -416
- package/lib/resolution.js +62 -98
- package/lib/selector.js +91 -139
- package/lib/supports.js +194 -246
- package/lib/transition.js +170 -265
- package/lib/utils.js +49 -72
- package/lib/value.js +77 -116
- package/lib/vendor.js +14 -0
- package/package.json +23 -12
package/lib/hacks/order.js
CHANGED
|
@@ -1,72 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var flexSpec = require('./flex-spec');
|
|
10
|
-
|
|
11
|
-
var Declaration = require('../declaration');
|
|
12
|
-
|
|
13
|
-
var Order = /*#__PURE__*/function (_Declaration) {
|
|
14
|
-
_inheritsLoose(Order, _Declaration);
|
|
15
|
-
|
|
16
|
-
function Order() {
|
|
17
|
-
return _Declaration.apply(this, arguments) || this;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var _proto = Order.prototype;
|
|
1
|
+
let flexSpec = require('./flex-spec')
|
|
2
|
+
let Declaration = require('../declaration')
|
|
21
3
|
|
|
4
|
+
class Order extends Declaration {
|
|
22
5
|
/**
|
|
23
6
|
* Change property name for 2009 and 2012 specs
|
|
24
7
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _flexSpec = flexSpec(prefix);
|
|
29
|
-
|
|
30
|
-
spec = _flexSpec[0];
|
|
31
|
-
prefix = _flexSpec[1];
|
|
32
|
-
|
|
8
|
+
prefixed (prop, prefix) {
|
|
9
|
+
let spec
|
|
10
|
+
;[spec, prefix] = flexSpec(prefix)
|
|
33
11
|
if (spec === 2009) {
|
|
34
|
-
return prefix + 'box-ordinal-group'
|
|
12
|
+
return prefix + 'box-ordinal-group'
|
|
35
13
|
}
|
|
36
|
-
|
|
37
14
|
if (spec === 2012) {
|
|
38
|
-
return prefix + 'flex-order'
|
|
15
|
+
return prefix + 'flex-order'
|
|
39
16
|
}
|
|
40
|
-
|
|
41
|
-
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
17
|
+
return super.prefixed(prop, prefix)
|
|
42
18
|
}
|
|
19
|
+
|
|
43
20
|
/**
|
|
44
21
|
* Return property name by final spec
|
|
45
22
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_proto.normalize = function normalize() {
|
|
49
|
-
return 'order';
|
|
23
|
+
normalize () {
|
|
24
|
+
return 'order'
|
|
50
25
|
}
|
|
26
|
+
|
|
51
27
|
/**
|
|
52
28
|
* Fix value for 2009 spec
|
|
53
29
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_proto.set = function set(decl, prefix) {
|
|
57
|
-
var spec = flexSpec(prefix)[0];
|
|
58
|
-
|
|
30
|
+
set (decl, prefix) {
|
|
31
|
+
let spec = flexSpec(prefix)[0]
|
|
59
32
|
if (spec === 2009 && /\d/.test(decl.value)) {
|
|
60
|
-
decl.value = (parseInt(decl.value) + 1).toString()
|
|
61
|
-
return
|
|
33
|
+
decl.value = (parseInt(decl.value) + 1).toString()
|
|
34
|
+
return super.set(decl, prefix)
|
|
62
35
|
}
|
|
36
|
+
return super.set(decl, prefix)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
63
39
|
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return Order;
|
|
68
|
-
}(Declaration);
|
|
69
|
-
|
|
70
|
-
_defineProperty(Order, "names", ['order', 'flex-order', 'box-ordinal-group']);
|
|
40
|
+
Order.names = ['order', 'flex-order', 'box-ordinal-group']
|
|
71
41
|
|
|
72
|
-
module.exports = Order
|
|
42
|
+
module.exports = Order
|
|
@@ -1,54 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Declaration = require('../declaration');
|
|
10
|
-
|
|
11
|
-
var OverscrollBehavior = /*#__PURE__*/function (_Declaration) {
|
|
12
|
-
_inheritsLoose(OverscrollBehavior, _Declaration);
|
|
13
|
-
|
|
14
|
-
function OverscrollBehavior() {
|
|
15
|
-
return _Declaration.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var _proto = OverscrollBehavior.prototype;
|
|
1
|
+
let Declaration = require('../declaration')
|
|
19
2
|
|
|
3
|
+
class OverscrollBehavior extends Declaration {
|
|
20
4
|
/**
|
|
21
5
|
* Change property name for IE
|
|
22
6
|
*/
|
|
23
|
-
|
|
24
|
-
return prefix + 'scroll-chaining'
|
|
7
|
+
prefixed (prop, prefix) {
|
|
8
|
+
return prefix + 'scroll-chaining'
|
|
25
9
|
}
|
|
10
|
+
|
|
26
11
|
/**
|
|
27
12
|
* Return property name by spec
|
|
28
13
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_proto.normalize = function normalize() {
|
|
32
|
-
return 'overscroll-behavior';
|
|
14
|
+
normalize () {
|
|
15
|
+
return 'overscroll-behavior'
|
|
33
16
|
}
|
|
17
|
+
|
|
34
18
|
/**
|
|
35
19
|
* Change value for IE
|
|
36
20
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_proto.set = function set(decl, prefix) {
|
|
21
|
+
set (decl, prefix) {
|
|
40
22
|
if (decl.value === 'auto') {
|
|
41
|
-
decl.value = 'chained'
|
|
23
|
+
decl.value = 'chained'
|
|
42
24
|
} else if (decl.value === 'none' || decl.value === 'contain') {
|
|
43
|
-
decl.value = 'none'
|
|
25
|
+
decl.value = 'none'
|
|
44
26
|
}
|
|
27
|
+
return super.set(decl, prefix)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return OverscrollBehavior;
|
|
50
|
-
}(Declaration);
|
|
51
|
-
|
|
52
|
-
_defineProperty(OverscrollBehavior, "names", ['overscroll-behavior', 'scroll-chaining']);
|
|
31
|
+
OverscrollBehavior.names = ['overscroll-behavior', 'scroll-chaining']
|
|
53
32
|
|
|
54
|
-
module.exports = OverscrollBehavior
|
|
33
|
+
module.exports = OverscrollBehavior
|
package/lib/hacks/pixelated.js
CHANGED
|
@@ -1,58 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var OldValue = require('../old-value');
|
|
10
|
-
|
|
11
|
-
var Value = require('../value');
|
|
12
|
-
|
|
13
|
-
var Pixelated = /*#__PURE__*/function (_Value) {
|
|
14
|
-
_inheritsLoose(Pixelated, _Value);
|
|
15
|
-
|
|
16
|
-
function Pixelated() {
|
|
17
|
-
return _Value.apply(this, arguments) || this;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var _proto = Pixelated.prototype;
|
|
1
|
+
let OldValue = require('../old-value')
|
|
2
|
+
let Value = require('../value')
|
|
21
3
|
|
|
4
|
+
class Pixelated extends Value {
|
|
22
5
|
/**
|
|
23
6
|
* Use non-standard name for WebKit and Firefox
|
|
24
7
|
*/
|
|
25
|
-
|
|
8
|
+
replace (string, prefix) {
|
|
26
9
|
if (prefix === '-webkit-') {
|
|
27
|
-
return string.replace(this.regexp(), '$1-webkit-optimize-contrast')
|
|
10
|
+
return string.replace(this.regexp(), '$1-webkit-optimize-contrast')
|
|
28
11
|
}
|
|
29
|
-
|
|
30
12
|
if (prefix === '-moz-') {
|
|
31
|
-
return string.replace(this.regexp(), '$1-moz-crisp-edges')
|
|
13
|
+
return string.replace(this.regexp(), '$1-moz-crisp-edges')
|
|
32
14
|
}
|
|
33
|
-
|
|
34
|
-
return _Value.prototype.replace.call(this, string, prefix);
|
|
15
|
+
return super.replace(string, prefix)
|
|
35
16
|
}
|
|
17
|
+
|
|
36
18
|
/**
|
|
37
19
|
* Different name for WebKit and Firefox
|
|
38
20
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_proto.old = function old(prefix) {
|
|
21
|
+
old (prefix) {
|
|
42
22
|
if (prefix === '-webkit-') {
|
|
43
|
-
return new OldValue(this.name, '-webkit-optimize-contrast')
|
|
23
|
+
return new OldValue(this.name, '-webkit-optimize-contrast')
|
|
44
24
|
}
|
|
45
|
-
|
|
46
25
|
if (prefix === '-moz-') {
|
|
47
|
-
return new OldValue(this.name, '-moz-crisp-edges')
|
|
26
|
+
return new OldValue(this.name, '-moz-crisp-edges')
|
|
48
27
|
}
|
|
28
|
+
return super.old(prefix)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
49
31
|
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return Pixelated;
|
|
54
|
-
}(Value);
|
|
55
|
-
|
|
56
|
-
_defineProperty(Pixelated, "names", ['pixelated']);
|
|
32
|
+
Pixelated.names = ['pixelated']
|
|
57
33
|
|
|
58
|
-
module.exports = Pixelated
|
|
34
|
+
module.exports = Pixelated
|
package/lib/hacks/place-self.js
CHANGED
|
@@ -1,55 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Declaration = require('../declaration');
|
|
10
|
-
|
|
11
|
-
var utils = require('./grid-utils');
|
|
12
|
-
|
|
13
|
-
var PlaceSelf = /*#__PURE__*/function (_Declaration) {
|
|
14
|
-
_inheritsLoose(PlaceSelf, _Declaration);
|
|
15
|
-
|
|
16
|
-
function PlaceSelf() {
|
|
17
|
-
return _Declaration.apply(this, arguments) || this;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var _proto = PlaceSelf.prototype;
|
|
1
|
+
let Declaration = require('../declaration')
|
|
2
|
+
let utils = require('./grid-utils')
|
|
21
3
|
|
|
4
|
+
class PlaceSelf extends Declaration {
|
|
22
5
|
/**
|
|
23
6
|
* Translate place-self to separate -ms- prefixed properties
|
|
24
7
|
*/
|
|
25
|
-
|
|
26
|
-
if (prefix !== '-ms-') return
|
|
8
|
+
insert (decl, prefix, prefixes) {
|
|
9
|
+
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
|
27
10
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return undefined;
|
|
11
|
+
// prevent doubling of prefixes
|
|
12
|
+
if (decl.parent.some(i => i.prop === '-ms-grid-row-align')) {
|
|
13
|
+
return undefined
|
|
32
14
|
}
|
|
33
15
|
|
|
34
|
-
|
|
35
|
-
_utils$parse$ = _utils$parse[0],
|
|
36
|
-
first = _utils$parse$[0],
|
|
37
|
-
second = _utils$parse$[1];
|
|
16
|
+
let [[first, second]] = utils.parse(decl)
|
|
38
17
|
|
|
39
18
|
if (second) {
|
|
40
|
-
utils.insertDecl(decl, 'grid-row-align', first)
|
|
41
|
-
utils.insertDecl(decl, 'grid-column-align', second)
|
|
19
|
+
utils.insertDecl(decl, 'grid-row-align', first)
|
|
20
|
+
utils.insertDecl(decl, 'grid-column-align', second)
|
|
42
21
|
} else {
|
|
43
|
-
utils.insertDecl(decl, 'grid-row-align', first)
|
|
44
|
-
utils.insertDecl(decl, 'grid-column-align', first)
|
|
22
|
+
utils.insertDecl(decl, 'grid-row-align', first)
|
|
23
|
+
utils.insertDecl(decl, 'grid-column-align', first)
|
|
45
24
|
}
|
|
46
25
|
|
|
47
|
-
return undefined
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return PlaceSelf;
|
|
51
|
-
}(Declaration);
|
|
26
|
+
return undefined
|
|
27
|
+
}
|
|
28
|
+
}
|
|
52
29
|
|
|
53
|
-
|
|
30
|
+
PlaceSelf.names = ['place-self']
|
|
54
31
|
|
|
55
|
-
module.exports = PlaceSelf
|
|
32
|
+
module.exports = PlaceSelf
|
|
@@ -1,36 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Selector = require('../selector');
|
|
10
|
-
|
|
11
|
-
var PlaceholderShown = /*#__PURE__*/function (_Selector) {
|
|
12
|
-
_inheritsLoose(PlaceholderShown, _Selector);
|
|
13
|
-
|
|
14
|
-
function PlaceholderShown() {
|
|
15
|
-
return _Selector.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var _proto = PlaceholderShown.prototype;
|
|
1
|
+
let Selector = require('../selector')
|
|
19
2
|
|
|
3
|
+
class PlaceholderShown extends Selector {
|
|
20
4
|
/**
|
|
21
5
|
* Return different selectors depend on prefix
|
|
22
6
|
*/
|
|
23
|
-
|
|
7
|
+
prefixed (prefix) {
|
|
24
8
|
if (prefix === '-ms-') {
|
|
25
|
-
return ':-ms-input-placeholder'
|
|
9
|
+
return ':-ms-input-placeholder'
|
|
26
10
|
}
|
|
11
|
+
return `:${prefix}placeholder-shown`
|
|
12
|
+
}
|
|
13
|
+
}
|
|
27
14
|
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return PlaceholderShown;
|
|
32
|
-
}(Selector);
|
|
33
|
-
|
|
34
|
-
_defineProperty(PlaceholderShown, "names", [':placeholder-shown']);
|
|
15
|
+
PlaceholderShown.names = [':placeholder-shown']
|
|
35
16
|
|
|
36
|
-
module.exports = PlaceholderShown
|
|
17
|
+
module.exports = PlaceholderShown
|
package/lib/hacks/placeholder.js
CHANGED
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Selector = require('../selector');
|
|
10
|
-
|
|
11
|
-
var Placeholder = /*#__PURE__*/function (_Selector) {
|
|
12
|
-
_inheritsLoose(Placeholder, _Selector);
|
|
13
|
-
|
|
14
|
-
function Placeholder() {
|
|
15
|
-
return _Selector.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var _proto = Placeholder.prototype;
|
|
1
|
+
let Selector = require('../selector')
|
|
19
2
|
|
|
3
|
+
class Placeholder extends Selector {
|
|
20
4
|
/**
|
|
21
5
|
* Add old mozilla to possible prefixes
|
|
22
6
|
*/
|
|
23
|
-
|
|
24
|
-
return
|
|
7
|
+
possible () {
|
|
8
|
+
return super.possible().concat(['-moz- old', '-ms- old'])
|
|
25
9
|
}
|
|
10
|
+
|
|
26
11
|
/**
|
|
27
12
|
* Return different selectors depend on prefix
|
|
28
13
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_proto.prefixed = function prefixed(prefix) {
|
|
14
|
+
prefixed (prefix) {
|
|
32
15
|
if (prefix === '-webkit-') {
|
|
33
|
-
return '::-webkit-input-placeholder'
|
|
16
|
+
return '::-webkit-input-placeholder'
|
|
34
17
|
}
|
|
35
|
-
|
|
36
18
|
if (prefix === '-ms-') {
|
|
37
|
-
return '::-ms-input-placeholder'
|
|
19
|
+
return '::-ms-input-placeholder'
|
|
38
20
|
}
|
|
39
|
-
|
|
40
21
|
if (prefix === '-ms- old') {
|
|
41
|
-
return ':-ms-input-placeholder'
|
|
22
|
+
return ':-ms-input-placeholder'
|
|
42
23
|
}
|
|
43
|
-
|
|
44
24
|
if (prefix === '-moz- old') {
|
|
45
|
-
return ':-moz-placeholder'
|
|
25
|
+
return ':-moz-placeholder'
|
|
46
26
|
}
|
|
27
|
+
return `::${prefix}placeholder`
|
|
28
|
+
}
|
|
29
|
+
}
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return Placeholder;
|
|
52
|
-
}(Selector);
|
|
53
|
-
|
|
54
|
-
_defineProperty(Placeholder, "names", ['::placeholder']);
|
|
31
|
+
Placeholder.names = ['::placeholder']
|
|
55
32
|
|
|
56
|
-
module.exports = Placeholder
|
|
33
|
+
module.exports = Placeholder
|
|
@@ -1,38 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Declaration = require('../declaration');
|
|
10
|
-
|
|
11
|
-
var TextDecorationSkipInk = /*#__PURE__*/function (_Declaration) {
|
|
12
|
-
_inheritsLoose(TextDecorationSkipInk, _Declaration);
|
|
13
|
-
|
|
14
|
-
function TextDecorationSkipInk() {
|
|
15
|
-
return _Declaration.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var _proto = TextDecorationSkipInk.prototype;
|
|
1
|
+
let Declaration = require('../declaration')
|
|
19
2
|
|
|
3
|
+
class TextDecorationSkipInk extends Declaration {
|
|
20
4
|
/**
|
|
21
5
|
* Change prefix for ink value
|
|
22
6
|
*/
|
|
23
|
-
|
|
7
|
+
set (decl, prefix) {
|
|
24
8
|
if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
|
|
25
|
-
decl.prop = prefix + 'text-decoration-skip'
|
|
26
|
-
decl.value = 'ink'
|
|
27
|
-
return decl
|
|
9
|
+
decl.prop = prefix + 'text-decoration-skip'
|
|
10
|
+
decl.value = 'ink'
|
|
11
|
+
return decl
|
|
28
12
|
} else {
|
|
29
|
-
return
|
|
13
|
+
return super.set(decl, prefix)
|
|
30
14
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return TextDecorationSkipInk;
|
|
34
|
-
}(Declaration);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
35
17
|
|
|
36
|
-
|
|
18
|
+
TextDecorationSkipInk.names = [
|
|
19
|
+
'text-decoration-skip-ink',
|
|
20
|
+
'text-decoration-skip'
|
|
21
|
+
]
|
|
37
22
|
|
|
38
|
-
module.exports = TextDecorationSkipInk
|
|
23
|
+
module.exports = TextDecorationSkipInk
|
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function TextDecoration() {
|
|
17
|
-
return _Declaration.apply(this, arguments) || this;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var _proto = TextDecoration.prototype;
|
|
21
|
-
|
|
1
|
+
let Declaration = require('../declaration')
|
|
2
|
+
|
|
3
|
+
const BASIC = [
|
|
4
|
+
'none',
|
|
5
|
+
'underline',
|
|
6
|
+
'overline',
|
|
7
|
+
'line-through',
|
|
8
|
+
'blink',
|
|
9
|
+
'inherit',
|
|
10
|
+
'initial',
|
|
11
|
+
'unset'
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
class TextDecoration extends Declaration {
|
|
22
15
|
/**
|
|
23
16
|
* Do not add prefixes for basic values.
|
|
24
17
|
*/
|
|
25
|
-
|
|
26
|
-
return decl.value.split(/\s+/).some(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return TextDecoration;
|
|
32
|
-
}(Declaration);
|
|
18
|
+
check (decl) {
|
|
19
|
+
return decl.value.split(/\s+/).some(i => !BASIC.includes(i))
|
|
20
|
+
}
|
|
21
|
+
}
|
|
33
22
|
|
|
34
|
-
|
|
23
|
+
TextDecoration.names = ['text-decoration']
|
|
35
24
|
|
|
36
|
-
module.exports = TextDecoration
|
|
25
|
+
module.exports = TextDecoration
|
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
let Declaration = require('../declaration')
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var Declaration = require('../declaration');
|
|
10
|
-
|
|
11
|
-
var TextEmphasisPosition = /*#__PURE__*/function (_Declaration) {
|
|
12
|
-
_inheritsLoose(TextEmphasisPosition, _Declaration);
|
|
13
|
-
|
|
14
|
-
function TextEmphasisPosition() {
|
|
15
|
-
return _Declaration.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var _proto = TextEmphasisPosition.prototype;
|
|
19
|
-
|
|
20
|
-
_proto.set = function set(decl, prefix) {
|
|
3
|
+
class TextEmphasisPosition extends Declaration {
|
|
4
|
+
set (decl, prefix) {
|
|
21
5
|
if (prefix === '-webkit-') {
|
|
22
|
-
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '')
|
|
6
|
+
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '')
|
|
23
7
|
}
|
|
8
|
+
return super.set(decl, prefix)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
24
11
|
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return TextEmphasisPosition;
|
|
29
|
-
}(Declaration);
|
|
30
|
-
|
|
31
|
-
_defineProperty(TextEmphasisPosition, "names", ['text-emphasis-position']);
|
|
12
|
+
TextEmphasisPosition.names = ['text-emphasis-position']
|
|
32
13
|
|
|
33
|
-
module.exports = TextEmphasisPosition
|
|
14
|
+
module.exports = TextEmphasisPosition
|