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