source: imaps-frontend/node_modules/inline-style-prefixer/es/plugins/logical.js

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

Update repo after prototype presentation

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