mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
use minify
This commit is contained in:
52
node_modules/clean-css/lib/optimizer/level-2/break-up.js
generated
vendored
52
node_modules/clean-css/lib/optimizer/level-2/break-up.js
generated
vendored
@@ -105,7 +105,7 @@ function animation(property, compactable, validator) {
|
||||
} else if (validator.isTime(value[1]) && !delaySet) {
|
||||
delay.value = [value];
|
||||
delaySet = true;
|
||||
} else if ((validator.isGlobal(value[1]) || validator.isAnimationTimingFunction(value[1])) && !timingSet) {
|
||||
} else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
|
||||
timing.value = [value];
|
||||
timingSet = true;
|
||||
} else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {
|
||||
@@ -523,6 +523,53 @@ function listStyle(property, compactable, validator) {
|
||||
return components;
|
||||
}
|
||||
|
||||
function transition(property, compactable, validator) {
|
||||
var prop = _wrapDefault(property.name + '-property', property, compactable);
|
||||
var duration = _wrapDefault(property.name + '-duration', property, compactable);
|
||||
var timing = _wrapDefault(property.name + '-timing-function', property, compactable);
|
||||
var delay = _wrapDefault(property.name + '-delay', property, compactable);
|
||||
var components = [prop, duration, timing, delay];
|
||||
var values = property.value;
|
||||
var value;
|
||||
var durationSet = false;
|
||||
var delaySet = false;
|
||||
var propSet = false;
|
||||
var timingSet = false;
|
||||
var i;
|
||||
var l;
|
||||
|
||||
if (property.value.length == 1 && property.value[0][1] == 'inherit') {
|
||||
prop.value = duration.value = timing.value = delay.value = property.value;
|
||||
return components;
|
||||
}
|
||||
|
||||
if (values.length > 1 && _anyIsInherit(values)) {
|
||||
throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
|
||||
}
|
||||
|
||||
for (i = 0, l = values.length; i < l; i++) {
|
||||
value = values[i];
|
||||
|
||||
if (validator.isTime(value[1]) && !durationSet) {
|
||||
duration.value = [value];
|
||||
durationSet = true;
|
||||
} else if (validator.isTime(value[1]) && !delaySet) {
|
||||
delay.value = [value];
|
||||
delaySet = true;
|
||||
} else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
|
||||
timing.value = [value];
|
||||
timingSet = true;
|
||||
} else if (validator.isIdentifier(value[1]) && !propSet) {
|
||||
prop.value = [value];
|
||||
propSet = true;
|
||||
} else {
|
||||
throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');
|
||||
}
|
||||
}
|
||||
|
||||
return components;
|
||||
}
|
||||
|
||||
function widthStyleColor(property, compactable, validator) {
|
||||
var descriptor = compactable[property.name];
|
||||
var components = [
|
||||
@@ -592,5 +639,6 @@ module.exports = {
|
||||
fourValues: fourValues,
|
||||
listStyle: listStyle,
|
||||
multiplex: multiplex,
|
||||
outline: widthStyleColor
|
||||
outline: widthStyleColor,
|
||||
transition: transition
|
||||
};
|
||||
|
Reference in New Issue
Block a user