diff options
Diffstat (limited to 'exampleData/ruleSets/fontRules.json')
-rw-r--r-- | exampleData/ruleSets/fontRules.json | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/exampleData/ruleSets/fontRules.json b/exampleData/ruleSets/fontRules.json index 819604f..297d242 100644 --- a/exampleData/ruleSets/fontRules.json +++ b/exampleData/ruleSets/fontRules.json @@ -6,24 +6,25 @@ * */ -{ 'name': "Fonts" -, 'description': "Guidelines regarding site fonts" +{ 'name': 'Fonts' +, 'description': 'Guidelines regarding site fonts' , 'rules': [ //--------------------------------------------------------- - { 'name': "Font properties check" - , 'description': "Verify that fonts (family, size, weight) are \"standard\"" + { 'id': 5141301 + , 'name': 'Font properties check' + , 'description': 'Verify that fonts (family, size, weight) are \"standard\"' , 'rule': function() { var allow = { - "Verdana": { "bold": [25, 22, 12, 10] - , "normal": [12, 11, 10] }}; + 'Verdana': { 'bold': [25, 22, 12, 10] + , 'normal': [12, 11, 10] }}; fiveui.query('body p,:header').each( function(i, elt) { var font = fiveui.font.getFont($(elt)); if (!fiveui.font.validate(allow, font)) { report('non-standard font: ' + - font.family + ", " + - font.size + ", " + + font.family + ', ' + + font.size + ', ' + font.weight, elt); } }); |