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.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 Value = require('../value');
  6. var DisplayGrid =
  7. /*#__PURE__*/
  8. function (_Value) {
  9. _inheritsLoose(DisplayGrid, _Value);
  10. function DisplayGrid(name, prefixes) {
  11. var _this;
  12. _this = _Value.call(this, name, prefixes) || this;
  13. if (name === 'display-grid') {
  14. _this.name = 'grid';
  15. }
  16. return _this;
  17. }
  18. /**
  19. * Faster check for flex value
  20. */
  21. var _proto = DisplayGrid.prototype;
  22. _proto.check = function check(decl) {
  23. return decl.prop === 'display' && decl.value === this.name;
  24. };
  25. return DisplayGrid;
  26. }(Value);
  27. _defineProperty(DisplayGrid, "names", ['display-grid', 'inline-grid']);
  28. module.exports = DisplayGrid;