[6a3a178] | 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 BASIC = ['none', 'underline', 'overline', 'line-through', 'blink', 'inherit', 'initial', 'unset'];
|
---|
| 12 |
|
---|
| 13 | var TextDecoration = /*#__PURE__*/function (_Declaration) {
|
---|
| 14 | _inheritsLoose(TextDecoration, _Declaration);
|
---|
| 15 |
|
---|
| 16 | function TextDecoration() {
|
---|
| 17 | return _Declaration.apply(this, arguments) || this;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | var _proto = TextDecoration.prototype;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Do not add prefixes for basic values.
|
---|
| 24 | */
|
---|
| 25 | _proto.check = function check(decl) {
|
---|
| 26 | return decl.value.split(/\s+/).some(function (i) {
|
---|
| 27 | return !BASIC.includes(i);
|
---|
| 28 | });
|
---|
| 29 | };
|
---|
| 30 |
|
---|
| 31 | return TextDecoration;
|
---|
| 32 | }(Declaration);
|
---|
| 33 |
|
---|
| 34 | _defineProperty(TextDecoration, "names", ['text-decoration']);
|
---|
| 35 |
|
---|
| 36 | module.exports = TextDecoration; |
---|