1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 12:20:04 +02:00

update node modules

This commit is contained in:
s2
2021-05-07 15:56:33 +02:00
parent d81e8e9fb8
commit 3ec373077c
550 changed files with 84712 additions and 15991 deletions

View File

@@ -0,0 +1,25 @@
var FUNCTION_PATTERN = /^(?:\-moz\-calc|\-webkit\-calc|calc|rgb|hsl|rgba|hsla|min|max|clamp)\(/;
var plugin = {
level1: {
value: function zero(name, value, options) {
if (!options.compatibility.properties.zeroUnits) {
return value;
}
if (FUNCTION_PATTERN.test(value)) {
return value;
}
if (value.indexOf('%') > 0 && (name == 'height' || name == 'max-height' || name == 'width' || name == 'max-width')) {
return value;
}
return value
.replace(options.unitsRegexp, '$1' + '0' + '$2')
.replace(options.unitsRegexp, '$1' + '0' + '$2');
}
}
};
module.exports = plugin;