1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/csso/lib/clean/Declaration.js

15 lines
382 B
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
var property = require('css-tree').property;
2023-12-18 13:12:25 +08:00
module.exports = function cleanDeclartion(node, item, list) {
if (node.value.children && node.value.children.isEmpty()) {
list.remove(item);
2024-01-16 21:26:16 +08:00
return;
}
if (property(node.property).custom) {
if (/\S/.test(node.value.value)) {
node.value.value = node.value.value.trim();
}
2023-12-18 13:12:25 +08:00
}
};