You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

4 years ago
  1. "use strict";
  2. 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; }
  3. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
  4. 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; }
  5. var Declaration = require('../declaration');
  6. var utils = require('../utils');
  7. var BackgroundClip =
  8. /*#__PURE__*/
  9. function (_Declaration) {
  10. _inheritsLoose(BackgroundClip, _Declaration);
  11. function BackgroundClip(name, prefixes, all) {
  12. var _this;
  13. _this = _Declaration.call(this, name, prefixes, all) || this;
  14. if (_this.prefixes) {
  15. _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
  16. return i === '-ms-' ? '-webkit-' : i;
  17. }));
  18. }
  19. return _this;
  20. }
  21. var _proto = BackgroundClip.prototype;
  22. _proto.check = function check(decl) {
  23. return decl.value.toLowerCase() === 'text';
  24. };
  25. return BackgroundClip;
  26. }(Declaration);
  27. _defineProperty(BackgroundClip, "names", ['background-clip']);
  28. module.exports = BackgroundClip;