Merge branch 'analyze-css-0.7.0'

This commit is contained in:
Gaël Métais
2014-11-12 09:04:01 +01:00
2 changed files with 39 additions and 2 deletions
+3 -1
View File
@@ -262,7 +262,8 @@ app.controller('ResultsCtrl', function ($scope) {
var note = 'A';
var score = $scope.phantomasResults.metrics.cssRules +
$scope.phantomasResults.metrics.cssComplexSelectors * 5;
$scope.phantomasResults.metrics.cssComplexSelectors * 5 +
$scope.phantomasResults.metrics.cssComplexSelectorsByAttribute * 15;
if (score > 500) {
note = 'B';
}
@@ -290,6 +291,7 @@ app.controller('ResultsCtrl', function ($scope) {
var note = 'A';
var score = $scope.phantomasResults.metrics.cssDuplicatedSelectors +
$scope.phantomasResults.metrics.cssDuplicatedProperties +
$scope.phantomasResults.metrics.cssEmptyRules +
$scope.phantomasResults.metrics.cssExpressions * 10 +
$scope.phantomasResults.metrics.cssImportants * 2 +