76 lines
1.7 KiB
JavaScript
76 lines
1.7 KiB
JavaScript
|
"use strict";
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
exports.default = void 0;
|
||
|
|
||
|
/**
|
||
|
* Copyright (c) Nicolas Gallagher.
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*
|
||
|
*
|
||
|
*/
|
||
|
var unitlessNumbers = {
|
||
|
animationIterationCount: true,
|
||
|
borderImageOutset: true,
|
||
|
borderImageSlice: true,
|
||
|
borderImageWidth: true,
|
||
|
boxFlex: true,
|
||
|
boxFlexGroup: true,
|
||
|
boxOrdinalGroup: true,
|
||
|
columnCount: true,
|
||
|
flex: true,
|
||
|
flexGrow: true,
|
||
|
flexOrder: true,
|
||
|
flexPositive: true,
|
||
|
flexShrink: true,
|
||
|
flexNegative: true,
|
||
|
fontWeight: true,
|
||
|
gridRow: true,
|
||
|
gridColumn: true,
|
||
|
lineClamp: true,
|
||
|
opacity: true,
|
||
|
order: true,
|
||
|
orphans: true,
|
||
|
tabSize: true,
|
||
|
widows: true,
|
||
|
zIndex: true,
|
||
|
zoom: true,
|
||
|
// SVG-related
|
||
|
fillOpacity: true,
|
||
|
floodOpacity: true,
|
||
|
stopOpacity: true,
|
||
|
strokeDasharray: true,
|
||
|
strokeDashoffset: true,
|
||
|
strokeMiterlimit: true,
|
||
|
strokeOpacity: true,
|
||
|
strokeWidth: true,
|
||
|
// transform types
|
||
|
scale: true,
|
||
|
scaleX: true,
|
||
|
scaleY: true,
|
||
|
scaleZ: true,
|
||
|
// RN properties
|
||
|
shadowOpacity: true
|
||
|
};
|
||
|
/**
|
||
|
* Support style names that may come passed in prefixed by adding permutations
|
||
|
* of vendor prefixes.
|
||
|
*/
|
||
|
|
||
|
var prefixes = ['ms', 'Moz', 'O', 'Webkit'];
|
||
|
|
||
|
var prefixKey = function prefixKey(prefix, key) {
|
||
|
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
||
|
};
|
||
|
|
||
|
Object.keys(unitlessNumbers).forEach(function (prop) {
|
||
|
prefixes.forEach(function (prefix) {
|
||
|
unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop];
|
||
|
});
|
||
|
});
|
||
|
var _default = unitlessNumbers;
|
||
|
exports.default = _default;
|
||
|
module.exports = exports.default;
|