Declaration.js 382 B

1234567891011121314
  1. var property = require('css-tree').property;
  2. module.exports = function cleanDeclartion(node, item, list) {
  3. if (node.value.children && node.value.children.isEmpty()) {
  4. list.remove(item);
  5. return;
  6. }
  7. if (property(node.property).custom) {
  8. if (/\S/.test(node.value.value)) {
  9. node.value.value = node.value.value.trim();
  10. }
  11. }
  12. };