mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 12:40:05 +02:00
update packages to latest version
This commit is contained in:
52
node_modules/clean-css/lib/options/compatibility.js
generated
vendored
52
node_modules/clean-css/lib/options/compatibility.js
generated
vendored
@@ -4,9 +4,7 @@ var DEFAULTS = {
|
||||
hexAlpha: false, // 4- and 8-character hex notation
|
||||
opacity: true // rgba / hsla
|
||||
},
|
||||
customUnits: {
|
||||
rpx: false
|
||||
},
|
||||
customUnits: { rpx: false },
|
||||
properties: {
|
||||
backgroundClipMerging: true, // background-clip to shorthand
|
||||
backgroundOriginMerging: true, // background-origin to shorthand
|
||||
@@ -79,17 +77,9 @@ var DEFAULTS = {
|
||||
}
|
||||
};
|
||||
|
||||
DEFAULTS.ie11 = merge(DEFAULTS['*'], {
|
||||
properties: {
|
||||
ieSuffixHack: true
|
||||
}
|
||||
});
|
||||
DEFAULTS.ie11 = merge(DEFAULTS['*'], { properties: { ieSuffixHack: true } });
|
||||
|
||||
DEFAULTS.ie10 = merge(DEFAULTS['*'], {
|
||||
properties: {
|
||||
ieSuffixHack: true
|
||||
}
|
||||
});
|
||||
DEFAULTS.ie10 = merge(DEFAULTS['*'], { properties: { ieSuffixHack: true } });
|
||||
|
||||
DEFAULTS.ie9 = merge(DEFAULTS['*'], {
|
||||
properties: {
|
||||
@@ -99,9 +89,7 @@ DEFAULTS.ie9 = merge(DEFAULTS['*'], {
|
||||
});
|
||||
|
||||
DEFAULTS.ie8 = merge(DEFAULTS.ie9, {
|
||||
colors: {
|
||||
opacity: false
|
||||
},
|
||||
colors: { opacity: false },
|
||||
properties: {
|
||||
backgroundClipMerging: false,
|
||||
backgroundOriginMerging: false,
|
||||
@@ -133,9 +121,7 @@ DEFAULTS.ie8 = merge(DEFAULTS.ie9, {
|
||||
});
|
||||
|
||||
DEFAULTS.ie7 = merge(DEFAULTS.ie8, {
|
||||
properties: {
|
||||
ieBangHack: true
|
||||
},
|
||||
properties: { ieBangHack: true },
|
||||
selectors: {
|
||||
ie7Hack: true,
|
||||
mergeablePseudoClasses: [
|
||||
@@ -144,7 +130,7 @@ DEFAULTS.ie7 = merge(DEFAULTS.ie8, {
|
||||
':hover',
|
||||
':visited'
|
||||
]
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function compatibilityFrom(source) {
|
||||
@@ -153,12 +139,14 @@ function compatibilityFrom(source) {
|
||||
|
||||
function merge(source, target) {
|
||||
for (var key in source) {
|
||||
var value = source[key];
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
var value = source[key];
|
||||
|
||||
if (typeof value === 'object' && !Array.isArray(value)) {
|
||||
target[key] = merge(value, target[key] || {});
|
||||
} else {
|
||||
target[key] = key in target ? target[key] : value;
|
||||
if (Object.prototype.hasOwnProperty.call(target, key) && typeof value === 'object' && !Array.isArray(value)) {
|
||||
target[key] = merge(value, target[key] || {});
|
||||
} else {
|
||||
target[key] = key in target ? target[key] : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,20 +154,18 @@ function merge(source, target) {
|
||||
}
|
||||
|
||||
function calculateSource(source) {
|
||||
if (typeof source == 'object')
|
||||
return source;
|
||||
if (typeof source == 'object') { return source; }
|
||||
|
||||
if (!/[,\+\-]/.test(source))
|
||||
return DEFAULTS[source] || DEFAULTS['*'];
|
||||
if (!/[,+-]/.test(source)) { return DEFAULTS[source] || DEFAULTS['*']; }
|
||||
|
||||
var parts = source.split(',');
|
||||
var template = parts[0] in DEFAULTS ?
|
||||
DEFAULTS[parts.shift()] :
|
||||
DEFAULTS['*'];
|
||||
var template = parts[0] in DEFAULTS
|
||||
? DEFAULTS[parts.shift()]
|
||||
: DEFAULTS['*'];
|
||||
|
||||
source = {};
|
||||
|
||||
parts.forEach(function (part) {
|
||||
parts.forEach(function(part) {
|
||||
var isAdd = part[0] == '+';
|
||||
var key = part.substring(1).split('.');
|
||||
var group = key[0];
|
||||
|
Reference in New Issue
Block a user