|
@@ -473,24 +473,6 @@ var policies = {
|
|
|
return offendersHelpers.orderByFile(parsedOffenders);
|
|
|
}
|
|
|
},
|
|
|
- "cssComplexSelectorsByAttribute": {
|
|
|
- "tool": "phantomas",
|
|
|
- "label": "Complex attributes selector",
|
|
|
- "message": "<p>Complex attributes selectors are one of these:<ul><li>.foo[type*=bar] (contains bar)</li><li>.foo[type^=bar] (starts with bar)</li><li>.foo[type|=bar] (starts with bar or bar-)</li><li>.foo[type$=bar] (ends with bar)</li><li>.foo[type~=bar baz] (bar or baz)</li></ul></p><p>Their matching process needs more CPU and it has a cost on performances.</p>",
|
|
|
- "isOkThreshold": 0,
|
|
|
- "isBadThreshold": 75,
|
|
|
- "isAbnormalThreshold": 150,
|
|
|
- "hasOffenders": true,
|
|
|
- "offendersTransformFn": function(offenders) {
|
|
|
- var parsedOffenders = offenders.map(function(offender) {
|
|
|
- var splittedOffender = offendersHelpers.cssOffenderPattern(offender);
|
|
|
- splittedOffender.bolded = splittedOffender.css.replace(/(\[[^ ]+[~\|\^\$\*]=["']?[^"'\]]+["']?\])/g, '<b>$1</b>');
|
|
|
- return splittedOffender;
|
|
|
- });
|
|
|
-
|
|
|
- return offendersHelpers.orderByFile(parsedOffenders);
|
|
|
- }
|
|
|
- },
|
|
|
"cssColors": {
|
|
|
"tool": "phantomas",
|
|
|
"label": "Colors count",
|
|
@@ -856,20 +838,6 @@ var policies = {
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
- "cssUniversalSelectors": {
|
|
|
- "tool": "phantomas",
|
|
|
- "label": "Universal selectors",
|
|
|
- "message": "<p>Universal selectors are the most expensive CSS selectors.</p><p>More informations <a href=\"http://perfectionkills.com/profiling-css-for-fun-and-profit-optimization-notes/\" target=\"_blank\">here</a>.</p>",
|
|
|
- "isOkThreshold": 0,
|
|
|
- "isBadThreshold": 50,
|
|
|
- "isAbnormalThreshold": 150,
|
|
|
- "hasOffenders": true,
|
|
|
- "offendersTransformFn": function(offenders) {
|
|
|
- var parsedOffenders = offenders.map(offendersHelpers.cssOffenderPattern);
|
|
|
-
|
|
|
- return offendersHelpers.orderByFile(parsedOffenders);
|
|
|
- }
|
|
|
- },
|
|
|
"cssRedundantBodySelectors": {
|
|
|
"tool": "phantomas",
|
|
|
"label": "Redundant body selectors",
|