source: trip-planner-front/node_modules/autoprefixer/lib/hacks/flex-grow.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1"use strict";
2
3function _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
5function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
6
7function _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
9var flexSpec = require('./flex-spec');
10
11var Declaration = require('../declaration');
12
13var Flex = /*#__PURE__*/function (_Declaration) {
14 _inheritsLoose(Flex, _Declaration);
15
16 function Flex() {
17 return _Declaration.apply(this, arguments) || this;
18 }
19
20 var _proto = Flex.prototype;
21
22 /**
23 * Return property name by final spec
24 */
25 _proto.normalize = function normalize() {
26 return 'flex';
27 }
28 /**
29 * Return flex property for 2009 and 2012 specs
30 */
31 ;
32
33 _proto.prefixed = function prefixed(prop, prefix) {
34 var spec;
35
36 var _flexSpec = flexSpec(prefix);
37
38 spec = _flexSpec[0];
39 prefix = _flexSpec[1];
40
41 if (spec === 2009) {
42 return prefix + 'box-flex';
43 }
44
45 if (spec === 2012) {
46 return prefix + 'flex-positive';
47 }
48
49 return _Declaration.prototype.prefixed.call(this, prop, prefix);
50 };
51
52 return Flex;
53}(Declaration);
54
55_defineProperty(Flex, "names", ['flex-grow', 'flex-positive']);
56
57module.exports = Flex;
Note: See TracBrowser for help on using the repository browser.