Skip to content

Commit

Permalink
Merge 881c659 into d2edb14
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 11, 2021
2 parents d2edb14 + 881c659 commit ba19f0f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/svg-sprite/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ execFile = require('child_process').execFile,
phantomjs = require('phantomjs-prebuilt').path,
dimensionsPhantomScript = path.resolve(__dirname, 'shape/dimensions.phantom.js'),
async = require('async'),
csso = require('csso'),
/**
* Default callback for shape ID generation
*
Expand Down Expand Up @@ -723,9 +724,8 @@ SVGShape.prototype.setNamespace = function(ns) {
// Substitute ID references in <style> elements
var style = select('//svg:style', this.dom);
if (style.length) {
var cssmin = require('cssmin');
select('//svg:style', this.dom).forEach(function(style) {
style.textContent = cssmin(this._replaceIdAndClassnameReferences(style.textContent, substIds, substClassnames, true));
style.textContent = csso.minifyBlock(this._replaceIdAndClassnameReferences(style.textContent, substIds, substClassnames, true), { restructure: false }).css;
}, this);
}

Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"async": "^3.2.0",
"css-selector-parser": "^1.4.1",
"cssmin": "^0.4.3",
"csso": "^4.2.0",
"cssom": "^0.4.4",
"glob": "^7.1.6",
"js-yaml": "^4.0.0",
Expand Down

0 comments on commit ba19f0f

Please sign in to comment.