1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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);
});
}
}//,
//----------------------------------------------------------------
]
}
*/
|