1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00
Commit Graph

530 Commits

Author SHA1 Message Date
8e45fa2d58 Add ‘ellipseToCircle’ plugin
Converts non-eccentric ellipse elements to circle elements.
Adobe Illustrator seems to be fond of using ellipses even if their rx === ry.
2019-07-13 22:31:22 +03:00
31e6a8cb65 Make removeDimensions add viewBox if it's missing 2019-07-13 22:27:47 +03:00
b9905aa5ec (Fix #800) Add option to the mergePaths plugin, forcing all path attributes to be combined (#1084)
Add  option to the mergePaths plugin, forcing all path attributes to be combined
2019-07-13 22:25:21 +03:00
9fe7c28a81 Bump dependencies 2019-07-13 22:10:10 +03:00
4dfbd76d59 Fix final sorting condition in ‘sortDefsChildren’ 2019-07-13 21:43:36 +03:00
258fecfa6b Remove spaces after ‘arcto’ path command flags 2019-07-13 16:18:08 +03:00
95f7603983 Fix removeUnusedNS not counting usage in <svg> tag
Close #1107
2019-05-19 20:44:36 +03:00
c7058eb7ac Fixes svg/svgo#761. Sorting defs to improve compression. 2019-05-04 20:23:30 +03:00
d23355e91a removeAttrs: add optional value filter (#977) 2019-02-24 22:01:01 +03:00
5d97108687 update namespace list (#1064) 2019-02-24 21:04:24 +03:00
7eeb5d064d Add config to preserve IDs based on prefix matching (#1060)
add parameter to preserve IDs based on prefix matching
2019-02-24 21:02:03 +03:00
416fcdfa9f SVGO: Add plugin "reusePaths". (#1005) 2019-02-24 20:28:56 +03:00
0fe5368e0e Add the preserveCurrentColor option to the removeAttrs plugin. (#1000)
Add the preserveCurrentColor option to the removeAttrs plugin.
2019-02-24 20:20:36 +03:00
32558b891f add removeOffCanvasPaths plugin (#979) 2019-02-24 20:13:12 +03:00
b4bd5d52e3 Add removeAttributesBySelector plugin (#929)
* Add removeAttributesBySelector plugin

Removes attributes of elements that match a css selector.
2019-02-24 20:07:38 +03:00
ed75e56bde Fix and update cleanupListOfValues tests 2018-09-16 20:58:12 +03:00
37d4ca88ef Fix cleanupListOfValues to preserve non-numeric values
Fix #923
2018-09-16 20:38:01 +03:00
eeeb67d5a8 Fix convertTransform wrong rotate sign
Fix #986
2018-09-16 19:47:51 +03:00
7a07b8436d Fix collapseGroups plugin affecting switch and subgroups
Fix #1020
2018-09-16 17:38:34 +03:00
5800635226 Fix converting to large arcs from nearly straight lines curves
Fix #842
2018-09-16 17:12:06 +03:00
a4fb3a4a7e Prevent removeUnknownsAndDefaults removing attributes from elements with id
Fix #959
2018-09-16 16:24:53 +03:00
831f95fccc Fix empty path segments removing with stroke-linecap
Fix #1017
2018-09-16 15:36:41 +03:00
a165206632 Update presentation attribute collection for removeNonInheritableGroupAttrs plugin 2018-09-16 11:07:43 +03:00
36db31adcf Fix removeNonInheritableGroupAttrs not working as intended 2018-09-15 22:48:09 +03:00
f3bcbcc6a6 Fix viewBox value parsing
Fix #1024
2018-09-15 18:52:35 +03:00
3c82fd7287 Correct parsing of arc flags without following comma/spaces
Fix #822
2018-09-15 16:38:34 +03:00
86ecd372e7 Handle !important keyword in convertStyleToAttrs
Fix #749
2018-09-15 15:15:11 +03:00
f92629fc54 Add keepRoleAttr option for removeUnknownsAndDefaults (#1002) 2018-09-15 14:48:15 +03:00
b2b9acb23e tweak: do not collapse group properties to children if they contain filters. 2018-09-15 14:45:46 +03:00
e7b8a6ce7d Upgrade css-tree from alpha25 to alpha.28
API changed walkFoo(ast, fun) to walk(ast,{visit: 'Rule',enter: fun)
csstree.translate renamed to csstree.generate
csstree.generate throws an error on invalid style where translate silently ignored it - update style processing to catch and ignore instead
Updated tests - csstree now omits more whitespace
2018-09-15 14:43:28 +03:00
e928c1f050 Update convertPathData.js (#906)
Added parameter forceAbsolutePath to get absolute SVG path (even when the relative path is shorter).
2018-09-15 14:40:34 +03:00
50f4fed02b dont transform stroke width for non-scaling-strokes (#857) 2018-09-15 14:39:36 +03:00
ba07843565 Don’t round version attribute (#1028)
Fixes #1003
2018-09-14 13:18:38 +03:00
54f92ce2de [plugin] sortAttrs: add xmlns order option (#984) 2018-06-15 11:28:59 +03:00
102a7210a7 Add Microsoft Visio XMLNS to removeEditorsNSData. (#974) 2018-06-02 14:10:26 +03:00
9dd1802a0d fixed #948 - adds prefixes to each class individually (#950) 2018-04-24 15:39:59 +03:00
dd65b54019 fix 2018-03-23 21:39:46 +03:00
0a142f3ca0 Prefix ids plugin don't add prefix if prefix is false (#907)
Add to 'prefixIds' the option to pass prefix as false or as a function that returns false
2018-03-16 20:39:21 +03:00
d968d45a25 Fixes #915 for collapseGroups (#916)
Fix #915 for collapseGroups: overwrite  value with parent value
When the inner element has the value, don't remove the parent groups that defines what that value is
2018-03-02 21:34:21 +03:00
40987c9643 Fix issue with prefixIDs plugin not replacing url() values correctly
Global regexs must be reseted after every exec call since they preserve the last matched index. Since we use `css-url-regex`, creating a new regex before `exec`ing fixes this.
2018-02-19 10:56:57 +05:30
1a3c32bb43 Fix error due to invalid transform. Close #846 2017-11-22 22:30:02 +03:00
b182569c5f Fixes #218 2017-11-22 21:42:49 +03:00
54de6f7592 Correct check for switch 2017-11-21 22:37:03 +03:00
eb3b4b8188 Prevent removing groups that are direct child of "<switch>". Fix #845 2017-11-21 21:58:17 +03:00
f067ea996f Fix removeViewBox to check for zero start coordinates. Fixes #832 2017-11-08 22:04:42 +03:00
ceccf1ffdc Fix inlineStyles working on foreignObject content. Fixes #823 2017-11-03 13:27:02 +03:00
f03d832838 Update readme to sync with actual state 2017-11-03 12:54:36 +03:00
e25cf30fcb Add tests and fix for onlyMatchedOnce option cleaning classes/IDs that matched more than once.
Improve code.
2017-11-03 12:35:46 +03:00
999cfbd97c Convert circles/ellipses to paths (#818) 2017-10-29 10:45:35 +03:00
b51192cb7a Fixed addClassesToSVGElement and added test 2017-10-25 22:25:57 +03:00