first commit
This commit is contained in:
16
build/node_modules/csso/lib/compressor/clean/Space.js
generated
vendored
Normal file
16
build/node_modules/csso/lib/compressor/clean/Space.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
function canCleanWhitespace(node) {
|
||||
if (node.type !== 'Operator') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return node.value !== '+' && node.value !== '-';
|
||||
}
|
||||
|
||||
module.exports = function cleanWhitespace(node, item, list) {
|
||||
var prev = item.prev && item.prev.data;
|
||||
var next = item.next && item.next.data;
|
||||
|
||||
if (canCleanWhitespace(prev) || canCleanWhitespace(next)) {
|
||||
list.remove(item);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user