You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
README.md currently presents two lists, with slightly different wordings.
"Default preset plugins"
"List of built-in plugings: enable by default vs disabled by default."
I suspect "Default preset plugins" and "List of built-in plugings: enable by default" should be the exact same plugins. The two lists are difficult to compare since they are in different order for no apparent reason.
This unclear duplication is confusing.
Recommendations
@TrySound, I can lead this forward but I need your or active leaders' feedback first. My notes...
Clarify the wording: if it's the same, use a consistent wording or replace "Default preset plugins" by _"Default preset of enabled plugins".
Clarify the order:README.md: better plugins' sorting #1430 point out the non-alphabetical order is voluntary because "Plugins are specified in order they are run which is critical for optimisation and correctness." If so, readme.md should states it.
Configuration section: should state that the plugins declaration order within svgo.config.js matters. (I made a README.md PR including that change).
Merge ?: It could be interesting to replace the first list by a pointer to the table and an explanation.
De-tablify: given table sorting is not possible on Github's markdown, the table has no significant comparative advantage for us. A well conceived list could prove to be a better practical fit. Example below:
Regex used : \|(.+?)\|(.+?)\|(.+?)\|\n -> * [$3] $1: $2\n and minor space eating sugars.
[enabled] cleanupAttrs : cleanup attributes from newlines, trailing, and repeating spaces
[enabled] mergeStyles : merge multiple style elements into one
[enabled] inlineStyles : move and merge styles from <style> elements to element style attributes
[enabled] convertColors : convert colors (from rgb() to #rrggbb, from #rrggbb to #rgb)
[enabled] convertPathData : convert Path data to relative or absolute (whichever is shorter), convert one segment to another, trim useless delimiters, smart rounding, and much more
[enabled] convertTransform : collapse multiple transforms into one, convert matrices to the short aliases, and much more
[enabled] removeUnknownsAndDefaults : remove unknown elements content and attributes, remove attributes with default values
convert Path data to relative or absolute (whichever is shorter), convert one segment to another, trim useless delimiters, smart rounding, and much more
Situation
README.md
currently presents two lists, with slightly different wordings.I suspect "Default preset plugins" and "List of built-in plugings: enable by default" should be the exact same plugins. The two lists are difficult to compare since they are in different order for no apparent reason.
This unclear duplication is confusing.
Recommendations
@TrySound, I can lead this forward but I need your or active leaders' feedback first. My notes...
svgo.config.js
matters. (I made a README.md PR including that change).Regex used :
\|(.+?)\|(.+?)\|(.+?)\|\n
->* [$3] $1: $2\n
and minor space eating sugars.enabled
] cleanupAttrs : cleanup attributes from newlines, trailing, and repeating spacesenabled
] mergeStyles : merge multiple style elements into oneenabled
] inlineStyles : move and merge styles from<style>
elements to elementstyle
attributesenabled
] removeDoctype : removedoctype
declarationenabled
] removeXMLProcInst : remove XML processing instructionsenabled
] removeComments : remove commentsenabled
] removeMetadata : remove<metadata>
enabled
] removeTitle : remove<title>
enabled
] removeDesc : remove<desc>
enabled
] removeUselessDefs : remove elements of<defs>
withoutid
disabled
] removeXMLNS : removes thexmlns
attribute (for inline SVG)enabled
] removeEditorsNSData : remove editors namespaces, elements, and attributesenabled
] removeEmptyAttrs : remove empty attributesenabled
] removeHiddenElems : remove hidden elementsenabled
] removeEmptyText : remove empty Text elementsenabled
] removeEmptyContainers : remove empty Container elementsenabled
] removeViewBox : removeviewBox
attribute when possibleenabled
] cleanupEnableBackground : remove or cleanupenable-background
attribute when possibleenabled
] minifyStyles : minify<style>
elements content with CSSOdisabled
] convertStyleToAttrs : convert styles into attributesenabled
] convertColors : convert colors (fromrgb()
to#rrggbb
, from#rrggbb
to#rgb
)enabled
] convertPathData : convert Path data to relative or absolute (whichever is shorter), convert one segment to another, trim useless delimiters, smart rounding, and much moreenabled
] convertTransform : collapse multiple transforms into one, convert matrices to the short aliases, and much moreenabled
] removeUnknownsAndDefaults : remove unknown elements content and attributes, remove attributes with default valuesenabled
] removeNonInheritableGroupAttrs : remove non-inheritable group's "presentation" attributesenabled
] removeUselessStrokeAndFill : remove uselessstroke
andfill
attributesenabled
] removeUnusedNS : remove unused namespaces declarationdisabled
] prefixIds : prefix IDs and classes with the SVG filename or an arbitrary stringenabled
] cleanupIDs : remove unused and minify used IDsenabled
] cleanupNumericValues : round numeric values to the fixed precision, remove defaultpx
unitsdisabled
] cleanupListOfValues : round numeric values in attributes that take a list of numbers (likeviewBox
orenable-background
)enabled
] moveElemsAttrsToGroup : move elements' attributes to their enclosing groupenabled
] moveGroupAttrsToElems : move some group attributes to the contained elementsenabled
] collapseGroups : collapse useless groupsdisabled
] removeRasterImages : remove raster imagesenabled
] mergePaths : merge multiple Paths into oneenabled
] convertShapeToPath : convert some basic shapes to<path>
enabled
] convertEllipseToCircle : convert non-eccentric<ellipse>
to<circle>
disabled
] sortAttrs : sort element attributes for epic readabilityenabled
] sortDefsChildren : sort children of<defs>
in order to improve compressiondisabled
] removeDimensions : removewidth
/height
and addviewBox
if it's missing (opposite to removeViewBox, disable it first)disabled
] removeAttrs : remove attributes by patterndisabled
] removeAttributesBySelector : removes attributes of elements that match a CSS selectordisabled
] removeElementsByAttr : remove arbitrary elements byID
orclassName
disabled
] addClassesToSVGElement : add classnames to an outer<svg>
elementdisabled
] addAttributesToSVGElement : adds attributes to an outer<svg>
elementdisabled
] removeOffCanvasPaths : removes elements that are drawn outside of the viewboxdisabled
] removeStyleElement : remove<style>
elementsdisabled
] removeScriptElement : remove<script>
elementsdisabled
] reusePaths : Find duplicated elements and replace them with linksSee also: #1430, #1455, #1335.
Default preset includes the following list of plugins:
Built-in plugins
enabled
enabled
<style>
elements to elementstyle
attributesenabled
doctype
declarationenabled
enabled
enabled
<metadata>
enabled
<title>
enabled
<desc>
enabled
<defs>
withoutid
enabled
xmlns
attribute (for inline SVG)disabled
enabled
enabled
enabled
enabled
enabled
viewBox
attribute when possibleenabled
enable-background
attribute when possibleenabled
<style>
elements content with CSSOenabled
disabled
rgb()
to#rrggbb
, from#rrggbb
to#rgb
)enabled
enabled
enabled
enabled
enabled
stroke
andfill
attributesenabled
enabled
disabled
enabled
px
unitsenabled
viewBox
orenable-background
)disabled
enabled
enabled
enabled
disabled
enabled
<path>
enabled
<ellipse>
to<circle>
enabled
disabled
<defs>
in order to improve compressionenabled
width
/height
and addviewBox
if it's missing (opposite to removeViewBox, disable it first)disabled
disabled
disabled
ID
orclassName
disabled
<svg>
elementdisabled
<svg>
elementdisabled
disabled
<style>
elementsdisabled
<script>
elementsdisabled
disabled
The text was updated successfully, but these errors were encountered: