mirror of
https://github.com/svg/svgo.git
synced 2025-09-17 08:02:12 +03:00
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
---
|
|
title: removeEmptyContainers
|
|
svgo:
|
|
pluginId: removeEmptyContainers
|
|
defaultPlugin: true
|
|
---
|
|
|
|
Remove container elements in the document that have no children or meaningful attributes, excluding the `<svg>` element which is ignored.
|
|
|
|
A container, as defined in the [SVG specifications](https://www.w3.org/TR/SVG11/intro.html#TermContainerElement), is an SVG element that can have graphical child elements. Container elements include:
|
|
|
|
- [`<a>`](https://developer.mozilla.org/docs/Web/SVG/Element/a)
|
|
- [`<defs>`](https://developer.mozilla.org/docs/Web/SVG/Element/defs)
|
|
- [`<glyph>`](https://developer.mozilla.org/docs/Web/SVG/Element/glyph)
|
|
- [`<g>`](https://developer.mozilla.org/docs/Web/SVG/Element/g)
|
|
- [`<marker>`](https://developer.mozilla.org/docs/Web/SVG/Element/marker)
|
|
- [`<mask>`](https://developer.mozilla.org/docs/Web/SVG/Element/mask)
|
|
- [`<missing-glyph>`](https://developer.mozilla.org/docs/Web/SVG/Element/missing-glyph)
|
|
- [`<pattern>`](https://developer.mozilla.org/docs/Web/SVG/Element/pattern)
|
|
- [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg)
|
|
- [`<switch>`](https://developer.mozilla.org/docs/Web/SVG/Element/switch)
|
|
- [`<symbol>`](https://developer.mozilla.org/docs/Web/SVG/Element/symbol)
|