source: imaps-frontend/node_modules/inline-style-prefixer/lib/plugins/logical.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[d565449]1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = logical;
7var alternativeProps = {
8 marginBlockStart: ['WebkitMarginBefore'],
9 marginBlockEnd: ['WebkitMarginAfter'],
10 marginInlineStart: ['WebkitMarginStart', 'MozMarginStart'],
11 marginInlineEnd: ['WebkitMarginEnd', 'MozMarginEnd'],
12 paddingBlockStart: ['WebkitPaddingBefore'],
13 paddingBlockEnd: ['WebkitPaddingAfter'],
14 paddingInlineStart: ['WebkitPaddingStart', 'MozPaddingStart'],
15 paddingInlineEnd: ['WebkitPaddingEnd', 'MozPaddingEnd'],
16 borderBlockStart: ['WebkitBorderBefore'],
17 borderBlockStartColor: ['WebkitBorderBeforeColor'],
18 borderBlockStartStyle: ['WebkitBorderBeforeStyle'],
19 borderBlockStartWidth: ['WebkitBorderBeforeWidth'],
20 borderBlockEnd: ['WebkitBorderAfter'],
21 borderBlockEndColor: ['WebkitBorderAfterColor'],
22 borderBlockEndStyle: ['WebkitBorderAfterStyle'],
23 borderBlockEndWidth: ['WebkitBorderAfterWidth'],
24 borderInlineStart: ['WebkitBorderStart', 'MozBorderStart'],
25 borderInlineStartColor: ['WebkitBorderStartColor', 'MozBorderStartColor'],
26 borderInlineStartStyle: ['WebkitBorderStartStyle', 'MozBorderStartStyle'],
27 borderInlineStartWidth: ['WebkitBorderStartWidth', 'MozBorderStartWidth'],
28 borderInlineEnd: ['WebkitBorderEnd', 'MozBorderEnd'],
29 borderInlineEndColor: ['WebkitBorderEndColor', 'MozBorderEndColor'],
30 borderInlineEndStyle: ['WebkitBorderEndStyle', 'MozBorderEndStyle'],
31 borderInlineEndWidth: ['WebkitBorderEndWidth', 'MozBorderEndWidth']
32};
33
34function logical(property, value, style) {
35 if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {
36 var alternativePropList = alternativeProps[property];
37 for (var i = 0, len = alternativePropList.length; i < len; ++i) {
38 style[alternativePropList[i]] = value;
39 }
40 }
41}
Note: See TracBrowser for help on using the repository browser.