1
0
mirror of https://github.com/svg/svgo.git synced 2026-01-27 07:02:06 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Seth Falco
5aad38bcc7 fix(inlineStyles): empty css block created empty attribute (#1823)
When running this plugin on an SVG with an empty block in the CSS, it
would apply it to the matched elements by adding an empty `style`
attribute. See the test for an example.

This resolves that by just dropping the declaration if it's empty.
2023-11-07 23:20:48 +00:00
Seth Falco
7de793c54a fix(removeComments): make preserving comments a param (#1812)
Converts the hard-coded exception to a param so users can override this
behavior to preserve custom patterns or drop the logic altogether.
2023-10-27 18:03:50 +01:00
Seth Falco
6eac770ba5 feat: convert one stop gradients plugin (#1790)
Detects if a redundant linearGradient or radialGradient is used with
only a single stop, which effectively means a solid color.

If this is found, just remove the gradient and replace references to it
with the color of the first and only stop defined.
2023-10-22 13:53:39 +01:00
Bogdan Chadkin
2260aab8c1 Remove csso types from definitions 2022-11-18 11:56:38 +03:00
Bogdan Chadkin
422fa142f2 Reuse plugin types for config 2022-11-11 12:50:33 +03:00
Bogdan Chadkin
e2e65cfc1e Move plugin types into d.ts 2022-11-11 12:19:38 +03:00