1 | "use strict";
|
---|
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;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Change prefix for ink value
|
---|
22 | */
|
---|
23 | _proto.set = function set(decl, prefix) {
|
---|
24 | if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
|
---|
25 | decl.prop = prefix + 'text-decoration-skip';
|
---|
26 | decl.value = 'ink';
|
---|
27 | return decl;
|
---|
28 | } else {
|
---|
29 | return _Declaration.prototype.set.call(this, decl, prefix);
|
---|
30 | }
|
---|
31 | };
|
---|
32 |
|
---|
33 | return TextDecorationSkipInk;
|
---|
34 | }(Declaration);
|
---|
35 |
|
---|
36 | _defineProperty(TextDecorationSkipInk, "names", ['text-decoration-skip-ink', 'text-decoration-skip']);
|
---|
37 |
|
---|
38 | module.exports = TextDecorationSkipInk; |
---|