Skip to content

Instantly share code, notes, and snippets.

@craigmdennis
Last active May 16, 2023 16:46
Show Gist options
  • Save craigmdennis/ff6e703bfc6fa29c3b1ebb51d0cf0cda to your computer and use it in GitHub Desktop.
Save craigmdennis/ff6e703bfc6fa29c3b1ebb51d0cf0cda to your computer and use it in GitHub Desktop.
SVGo Sketch Plugin Configuration
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": true,
"indent": 2,
"floatPrecision": 3,
"plugins": [
{
"name": "removeDoctype",
"enabled": true
},
{
"name": "removeXMLProcInst",
"enabled": true
},
{
"name": "removeComments",
"enabled": true
},
{
"name": "removeMetadata",
"enabled": true
},
{
"name": "removeXMLNS",
"enabled": false
},
{
"name": "removeEditorsNSData",
"enabled": true
},
{
"name": "cleanupAttrs",
"enabled": true
},
{
"name": "inlineStyles",
"enabled": false
},
{
"name": "minifyStyles",
"enabled": true
},
{
"name": "convertStyleToAttrs",
"enabled": true
},
{
"name": "cleanupIDs",
"enabled": true
},
{
"name": "prefixIds",
"enabled": false
},
{
"name": "removeRasterImages",
"enabled": false
},
{
"name": "removeUselessDefs",
"enabled": true
},
{
"name": "cleanupNumericValues",
"enabled": true
},
{
"name": "cleanupListOfValues",
"enabled": true
},
{
"name": "convertColors",
"enabled": true
},
{
"name": "removeUnknownsAndDefaults",
"enabled": true
},
{
"name": "removeNonInheritableGroupAttrs",
"enabled": true
},
{
"name": "removeUselessStrokeAndFill",
"enabled": true
},
{
"name": "removeViewBox",
"enabled": false
},
{
"name": "cleanupEnableBackground",
"enabled": false
},
{
"name": "removeHiddenElems",
"enabled": false
},
{
"name": "removeEmptyText",
"enabled": true
},
{
"name": "convertShapeToPath",
"enabled": false
},
{
"name": "moveElemsAttrsToGroup",
"enabled": false
},
{
"name": "moveGroupAttrsToElems",
"enabled": false
},
{
"name": "collapseGroups",
"enabled": true
},
{
"name": "convertPathData",
"enabled": false
},
{
"name": "convertTransform",
"enabled": true
},
{
"name": "removeEmptyAttrs",
"enabled": true
},
{
"name": "removeEmptyContainers",
"enabled": true
},
{
"name": "mergePaths",
"enabled": true
},
{
"name": "removeUnusedNS",
"enabled": true
},
{
"name": "sortAttrs",
"enabled": true
},
{
"name": "removeTitle",
"enabled": true
},
{
"name": "removeDesc",
"enabled": true,
"params": {
"removeAny": true
}
},
{
"name": "removeDimensions",
"enabled": false
},
{
"name": "removeAttrs",
"params": {
"attrs": ["fill", "color", "width", "height"]
}
},
{
"name": "removeElementsByAttr",
"enabled": false
},
{
"name": "addClassesToSVGElement",
"enabled": false
},
{
"name": "removeStyleElement",
"enabled": false
},
{
"name": "removeScriptElement",
"enabled": false
},
{
"name": "addAttributesToSVGElement",
"params": {
"attribute": {
"fill": "currentColor"
}
}
}
]
}
@vojtaholik
Copy link

neat! I wish there was a way to add attributes conditionally based on color value. "convert all #000 fills to currentColor"

@blarghie
Copy link

neat! I wish there was a way to add attributes conditionally based on color value. "convert all #000 fills to currentColor"

+1 on this. is this an attribute that can be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment