nav tabs on admin dashboard
This commit is contained in:
15
node_modules/svgo/plugins/removeUnknownsAndDefaults.js
generated
vendored
15
node_modules/svgo/plugins/removeUnknownsAndDefaults.js
generated
vendored
@@ -11,7 +11,9 @@ exports.params = {
|
||||
unknownAttrs: true,
|
||||
defaultAttrs: true,
|
||||
uselessOverrides: true,
|
||||
keepDataAttrs: true
|
||||
keepDataAttrs: true,
|
||||
keepAriaAttrs: true,
|
||||
keepRoleAttr: false
|
||||
};
|
||||
|
||||
var collections = require('./_collections'),
|
||||
@@ -19,7 +21,8 @@ var collections = require('./_collections'),
|
||||
attrsGroups = collections.attrsGroups,
|
||||
elemsGroups = collections.elemsGroups,
|
||||
attrsGroupsDefaults = collections.attrsGroupsDefaults,
|
||||
attrsInheritable = collections.inheritableAttrs;
|
||||
attrsInheritable = collections.inheritableAttrs,
|
||||
applyGroups = collections.presentationNonInheritableGroupAttrs;
|
||||
|
||||
// collect and extend all references
|
||||
for (var elem in elems) {
|
||||
@@ -105,7 +108,9 @@ exports.fn = function(item, params) {
|
||||
if (
|
||||
attr.name !== 'xmlns' &&
|
||||
(attr.prefix === 'xml' || !attr.prefix) &&
|
||||
(!params.keepDataAttrs || attr.name.indexOf('data-') != 0)
|
||||
(!params.keepDataAttrs || attr.name.indexOf('data-') != 0) &&
|
||||
(!params.keepAriaAttrs || attr.name.indexOf('aria-') != 0) &&
|
||||
(!params.keepRoleAttr || attr.name != 'role')
|
||||
) {
|
||||
if (
|
||||
// unknown attrs
|
||||
@@ -116,6 +121,7 @@ exports.fn = function(item, params) {
|
||||
// attrs with default values
|
||||
(
|
||||
params.defaultAttrs &&
|
||||
!item.hasAttr('id') &&
|
||||
elems[elem].defaults &&
|
||||
elems[elem].defaults[attr.name] === attr.value && (
|
||||
attrsInheritable.indexOf(attr.name) < 0 ||
|
||||
@@ -125,7 +131,8 @@ exports.fn = function(item, params) {
|
||||
// useless overrides
|
||||
(
|
||||
params.uselessOverrides &&
|
||||
attr.name !== 'transform' &&
|
||||
!item.hasAttr('id') &&
|
||||
applyGroups.indexOf(attr.name) < 0 &&
|
||||
attrsInheritable.indexOf(attr.name) > -1 &&
|
||||
item.parentNode.computedAttr(attr.name, attr.value)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user