Opal-Estate-Pro/node_modules/postcss-merge-longhand/dist/lib/canMerge.js
2019-09-13 11:27:52 +07:00

30 lines
780 B
JavaScript
Executable File

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var important = function important(node) {
return node.important;
};
var unimportant = function unimportant(node) {
return !node.important;
};
var hasInherit = function hasInherit(node) {
return ~node.value.indexOf('inherit');
};
var hasInitial = function hasInitial(node) {
return ~node.value.indexOf('initial');
};
exports['default'] = function () {
for (var _len = arguments.length, props = Array(_len), _key = 0; _key < _len; _key++) {
props[_key] = arguments[_key];
}
if (props.some(hasInherit) || props.some(hasInitial)) {
return false;
}
return props.every(important) || props.every(unimportant);
};
module.exports = exports['default'];