Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
36
Frontend-Learner/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js
generated
vendored
Normal file
36
Frontend-Learner/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import {
|
||||
attrsGroups,
|
||||
inheritableAttrs,
|
||||
presentationNonInheritableGroupAttrs,
|
||||
} from './_collections.js';
|
||||
|
||||
export const name = 'removeNonInheritableGroupAttrs';
|
||||
export const description =
|
||||
"removes non-inheritable group's presentational attributes";
|
||||
|
||||
/**
|
||||
* Remove non-inheritable group's "presentation" attributes.
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*
|
||||
* @type {import('../lib/types.js').Plugin}
|
||||
*/
|
||||
export const fn = () => {
|
||||
return {
|
||||
element: {
|
||||
enter: (node) => {
|
||||
if (node.name === 'g') {
|
||||
for (const name of Object.keys(node.attributes)) {
|
||||
if (
|
||||
attrsGroups.presentation.has(name) &&
|
||||
!inheritableAttrs.has(name) &&
|
||||
!presentationNonInheritableGroupAttrs.has(name)
|
||||
) {
|
||||
delete node.attributes[name];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue