Back to Svgo

collapseGroups

docs/04-plugins/collapseGroups.mdx

4.0.1574 B
Original Source

Finds groups that effectively do nothing and flattens them, preserving the contents of the groups.

Groups can be formed using the <g> element. They're used for organizing the document, or applying presentation attributes to all children contained in a group.

:::info

This plugin doesn't remove empty groups. That's handled by the removeEmptyContainers plugin which is enabled by default.

:::