Sha256: 8231127373feca2146d8b20b2518921ab571f8e528e1a51641c6365eeba3e994

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

# This rule is taken from https://github.com/stubbornella/csslint/tree/master/src/rules
#
#
# Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
# TODO: Paste the CSSLint LICENSE here.
#
#
# /*
#  * Rule: You shouldn't need more than 9 font-size declarations.
#  */
# 
# /*global CSSLint*/
# CSSLint.addRule({
# 
#     //rule information
#     id: "font-sizes",
#     name: "Disallow too many font sizes",
#     desc: "Checks the number of font-size declarations.",
#     browsers: "All",
# 
#     //initialization
#     init: function(parser, reporter){
#         var rule = this,
#             count = 0;
# 
#         //check for use of "font-size"
#         parser.addListener("property", function(event){
#             if (event.property == "font-size"){
#                 count++;
#             }
#         });
# 
#         //report the results
#         parser.addListener("endstylesheet", function(){
#             reporter.stat("font-sizes", count);
#             if (count >= 10){
#                 reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
#             }
#         });
#     }
# 
# });

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sasslint-0.0.1 lib/sasslint/rules/css/font-sizes.rb