diff options
author | 2013-06-17 00:22:49 -0700 | |
---|---|---|
committer | 2013-06-17 00:22:49 -0700 | |
commit | 27e7d5dbd6d6510df67b72f193fbdaaf7e837e59 (patch) | |
tree | 2d9a4d5ae23cc4208844d5306f39ed5a84ace6a3 /exampleData/ruleSets/color/colorRules.json | |
parent | 465269594485f4bf61c7475ac0f46c95b7357014 (diff) |
big cleanup and reorganization of exampleData directory; bugfixes to the basic/ rules; added test_basic.html for testing basic UI rules
Diffstat (limited to 'exampleData/ruleSets/color/colorRules.json')
-rw-r--r-- | exampleData/ruleSets/color/colorRules.json | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/exampleData/ruleSets/color/colorRules.json b/exampleData/ruleSets/color/colorRules.json new file mode 100644 index 0000000..300793a --- /dev/null +++ b/exampleData/ruleSets/color/colorRules.json @@ -0,0 +1,66 @@ +/* colorRules.json + * + * Simple rules for checking that the colors of specific elements are in a specific set. + * Test using exampleData/basic/testColorRules.html + */ + +{ "name": "Color Guidelines" +, "description": "Foreground/background color guidelines" +, "license": "BSD3" +, "rules": + [ "colorRules/foregroundCheck.js" + , "colorRules/backgroundCheck.js" + ] +} +//---------------------------------------------------------------- +/* { "id": 2141103 + , "name": "Content area color" + , "description": "Background color should be: " + + "#F7" + , "rule": + function() { + var allow = "#F7"; + $5("#content") + .cssIsNot("background-color", allow, fiveui.color.colorToHex) + .each(function(i, elt) { + var color = fiveui.color.colorToHex($(elt).css("background-color")); + report("non-standard content background color: " + color, elt); + }); + } + }, + //---------------------------------------------------------------- + { "id": 2141104 + , "name": "Left navigation color" + , "description": "Left navigation color should be: " + + "#C2" + , "rule": + function() { + var allow = "#C2"; + $5("#leftNav") + .cssIsNot("color", allow, fiveui.color.colorToHex) + .each(function(i, elt) { + var color = fiveui.color.colorToHex($(elt).css("color")); + report("non-standard left navigation color: " + color, elt); + }); + } + }, + //---------------------------------------------------------------- + { "id": 2141105 + , "name": "Header color check" + , "description": "Header color should be: " + + "#3D" + , "rule": + function() { + var allow = "#3D"; + $5(":header") + .cssIsNot("color", allow, fiveui.color.colorToHex) + .each(function(i, elt) { + var color = fiveui.color.colorToHex($(elt).css("color")); + report("non-standard header color: " + color, elt); + }); + } + }//, + //---------------------------------------------------------------- +] +} + */ |