source: trip-planner-front/node_modules/autoprefixer/lib/hacks/block-logical.js@ 6c1585f

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

initial commit

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[6a3a178]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 Declaration = require('../declaration');
10
11var BlockLogical = /*#__PURE__*/function (_Declaration) {
12 _inheritsLoose(BlockLogical, _Declaration);
13
14 function BlockLogical() {
15 return _Declaration.apply(this, arguments) || this;
16 }
17
18 var _proto = BlockLogical.prototype;
19
20 /**
21 * Use old syntax for -moz- and -webkit-
22 */
23 _proto.prefixed = function prefixed(prop, prefix) {
24 if (prop.includes('-start')) {
25 return prefix + prop.replace('-block-start', '-before');
26 }
27
28 return prefix + prop.replace('-block-end', '-after');
29 }
30 /**
31 * Return property name by spec
32 */
33 ;
34
35 _proto.normalize = function normalize(prop) {
36 if (prop.includes('-before')) {
37 return prop.replace('-before', '-block-start');
38 }
39
40 return prop.replace('-after', '-block-end');
41 };
42
43 return BlockLogical;
44}(Declaration);
45
46_defineProperty(BlockLogical, "names", ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']);
47
48module.exports = BlockLogical;
Note: See TracBrowser for help on using the repository browser.