flex-wrap.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 flexSpec = require('./flex-spec');
  6. var Declaration = require('../declaration');
  7. var FlexWrap = /*#__PURE__*/function (_Declaration) {
  8. _inheritsLoose(FlexWrap, _Declaration);
  9. function FlexWrap() {
  10. return _Declaration.apply(this, arguments) || this;
  11. }
  12. var _proto = FlexWrap.prototype;
  13. /**
  14. * Don't add prefix for 2009 spec
  15. */
  16. _proto.set = function set(decl, prefix) {
  17. var spec = flexSpec(prefix)[0];
  18. if (spec !== 2009) {
  19. return _Declaration.prototype.set.call(this, decl, prefix);
  20. }
  21. return undefined;
  22. };
  23. return FlexWrap;
  24. }(Declaration);
  25. _defineProperty(FlexWrap, "names", ['flex-wrap']);
  26. module.exports = FlexWrap;