瀏覽代碼

Make it easier to have a good CSS complexity score

Gaël Métais 10 年之前
父節點
當前提交
491ee93c69
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      app/public/scripts/resultsCtrl.js

+ 5 - 5
app/public/scripts/resultsCtrl.js

@@ -307,19 +307,19 @@ app.controller('ResultsCtrl', function ($scope) {
         var note = 'A';
         var note = 'A';
         var score = $scope.phantomasResults.metrics.cssRules +
         var score = $scope.phantomasResults.metrics.cssRules +
                     $scope.phantomasResults.metrics.cssComplexSelectors * 10;
                     $scope.phantomasResults.metrics.cssComplexSelectors * 10;
-        if (score > 200) {
+        if (score > 500) {
             note = 'B';
             note = 'B';
         }
         }
-        if (score > 500) {
+        if (score > 1000) {
             note = 'C';
             note = 'C';
         }
         }
-        if (score > 1000) {
+        if (score > 2000) {
             note = 'D';
             note = 'D';
         }
         }
-        if (score > 2000) {
+        if (score > 4500) {
             note = 'E';
             note = 'E';
         }
         }
-        if (score > 5000) {
+        if (score > 7000) {
             note = 'F';
             note = 'F';
         }
         }
         return note;
         return note;