From 723e2921d15de4cef99fa9691474fa83fec19f6d Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Mon, 25 Sep 2023 22:34:13 +0100 Subject: [PATCH] fix(minifyStyles): pass empty arrays for usage --- plugins/minifyStyles.js | 100 ++++++++++++++++--------------- test/plugins/minifyStyles.11.svg | 19 ++++++ 2 files changed, 71 insertions(+), 48 deletions(-) create mode 100644 test/plugins/minifyStyles.11.svg diff --git a/plugins/minifyStyles.js b/plugins/minifyStyles.js index a10b8d207..f8b58a43b 100644 --- a/plugins/minifyStyles.js +++ b/plugins/minifyStyles.js @@ -2,27 +2,47 @@ /** * @typedef {import('../lib/types').XastElement} XastElement + * @typedef {import('../lib/types').XastParent} XastParent */ const csso = require('csso'); +const { detachNodeFromParent } = require('../lib/xast'); exports.name = 'minifyStyles'; -exports.description = - 'minifies styles and removes unused styles based on usage data'; +exports.description = 'minifies styles and removes unused styles'; /** - * Minifies styles ( + + + +@@@ + + + +