![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/node_modules/csso/lib/replace/property/ |
function removeItemAndRedundantWhiteSpace(list, item) { var prev = item.prev; var next = item.next; if (next !== null) { if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) { list.remove(next); } } else if (prev !== null && prev.data.type === 'WhiteSpace') { list.remove(prev); } list.remove(item); } module.exports = function compressBorder(node) { node.children.each(function(node, item, list) { if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') { if (list.head === list.tail) { // replace `none` for zero when `none` is a single term item.data = { type: 'Number', loc: node.loc, value: '0' }; } else { removeItemAndRedundantWhiteSpace(list, item); } } }); };