Back to Svgo

removeAttrs

docs/04-plugins/removeAttrs.mdx

4.0.1474 B
Original Source

Remove attributes from elements matching a custom syntax.

The format accepted is [ element* : attribute* : value* ], where:

  • element: A regular expression matching element names. An asterisk or omission matches all elements.
  • attribute: A regular expression matching attribute names.
  • value: A regular expression matching attribute values. An asterisk or omission matches all values.

For example, path:fill matches all fill attributes in <path> elements.