mirror of
https://github.com/svg/svgo.git
synced 2026-01-27 07:02:06 +03:00
36 lines
1.8 KiB
Plaintext
36 lines
1.8 KiB
Plaintext
---
|
|
title: removeUnknownsAndDefaults
|
|
svgo:
|
|
pluginId: removeUnknownsAndDefaults
|
|
defaultPlugin: true
|
|
parameters:
|
|
unknownContent:
|
|
description: If to remove elements that are not known or can't be the child of the parent element according.
|
|
default: true
|
|
unknownAttrs:
|
|
description: If to remove attributes that are not assignable to the respective element.
|
|
default: true
|
|
defaultAttrs:
|
|
description: If to remove attributes that are assigned their default value anyway.
|
|
default: true
|
|
defaultMarkupDeclarations:
|
|
description: If to remove XML declarations that are assigned their default value. XML declarations are the properties in the `<?xml … ?>` block at the top of the document.
|
|
default: true
|
|
uselessOverrides:
|
|
description: If to remove attributes that are being if the same value is being inherited by it's parent element anyway.
|
|
default: true
|
|
keepDataAttrs:
|
|
description: If to keep [`data-*`](https://developer.mozilla.org/docs/Web/SVG/Attribute/data-*) attributes.
|
|
default: true
|
|
keepAriaAttrs:
|
|
description: If to keep [ARIA (Accessible Rich Internet Applications)](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) attributes, used for accessibility. This excludes `role`, which is managed with the `keepRoleAttr` parameter.
|
|
default: true
|
|
keepRoleAttr:
|
|
description: If to keep the ARIA [`role`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles) attribute.
|
|
default: false
|
|
---
|
|
|
|
Removes unknown elements and attributes, as well as attributes that are set to their default value.
|
|
|
|
This can also remove defaults from the XML declaration if present in the document, namely [`standalone`](https://www.w3.org/TR/REC-xml/#sec-rmd) if it's set to `no`.
|