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
|
|
|
}
|
|
|
|
};
|