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 utils = require('../utils');
|
---|
12 |
|
---|
13 | var BackgroundClip = /*#__PURE__*/function (_Declaration) {
|
---|
14 | _inheritsLoose(BackgroundClip, _Declaration);
|
---|
15 |
|
---|
16 | function BackgroundClip(name, prefixes, all) {
|
---|
17 | var _this;
|
---|
18 |
|
---|
19 | _this = _Declaration.call(this, name, prefixes, all) || this;
|
---|
20 |
|
---|
21 | if (_this.prefixes) {
|
---|
22 | _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
|
---|
23 | return i === '-ms-' ? '-webkit-' : i;
|
---|
24 | }));
|
---|
25 | }
|
---|
26 |
|
---|
27 | return _this;
|
---|
28 | }
|
---|
29 |
|
---|
30 | var _proto = BackgroundClip.prototype;
|
---|
31 |
|
---|
32 | _proto.check = function check(decl) {
|
---|
33 | return decl.value.toLowerCase() === 'text';
|
---|
34 | };
|
---|
35 |
|
---|
36 | return BackgroundClip;
|
---|
37 | }(Declaration);
|
---|
38 |
|
---|
39 | _defineProperty(BackgroundClip, "names", ['background-clip']);
|
---|
40 |
|
---|
41 | module.exports = BackgroundClip; |
---|