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 Declaration = require('../declaration');
|
---|
10 |
|
---|
11 | var GridStart = /*#__PURE__*/function (_Declaration) {
|
---|
12 | _inheritsLoose(GridStart, _Declaration);
|
---|
13 |
|
---|
14 | function GridStart() {
|
---|
15 | return _Declaration.apply(this, arguments) || this;
|
---|
16 | }
|
---|
17 |
|
---|
18 | var _proto = GridStart.prototype;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Do not add prefix for unsupported value in IE
|
---|
22 | */
|
---|
23 | _proto.check = function check(decl) {
|
---|
24 | var value = decl.value;
|
---|
25 | return !value.includes('/') || value.includes('span');
|
---|
26 | }
|
---|
27 | /**
|
---|
28 | * Return a final spec property
|
---|
29 | */
|
---|
30 | ;
|
---|
31 |
|
---|
32 | _proto.normalize = function normalize(prop) {
|
---|
33 | return prop.replace('-start', '');
|
---|
34 | }
|
---|
35 | /**
|
---|
36 | * Change property name for IE
|
---|
37 | */
|
---|
38 | ;
|
---|
39 |
|
---|
40 | _proto.prefixed = function prefixed(prop, prefix) {
|
---|
41 | var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
---|
42 |
|
---|
43 | if (prefix === '-ms-') {
|
---|
44 | result = result.replace('-start', '');
|
---|
45 | }
|
---|
46 |
|
---|
47 | return result;
|
---|
48 | };
|
---|
49 |
|
---|
50 | return GridStart;
|
---|
51 | }(Declaration);
|
---|
52 |
|
---|
53 | _defineProperty(GridStart, "names", ['grid-row-start', 'grid-column-start']);
|
---|
54 |
|
---|
55 | module.exports = GridStart; |
---|