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.

40 lines
1.4 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 Appearance =
  8. /*#__PURE__*/
  9. function (_Declaration) {
  10. _inheritsLoose(Appearance, _Declaration);
  11. function Appearance(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. if (i === '-ms-') {
  17. return '-webkit-';
  18. }
  19. return i;
  20. }));
  21. }
  22. return _this;
  23. }
  24. return Appearance;
  25. }(Declaration);
  26. _defineProperty(Appearance, "names", ['appearance']);
  27. module.exports = Appearance;