Sha256: 29d04b45e5d1748510f1e4cc4ef8031a655443f22b9b96a40a61caaf29561840

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 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: Warn people with approaching the IE 4095 limit 
#  */
# /*global CSSLint*/
# CSSLint.addRule({
# 
#     //rule information
#     id: "selector-max-approaching",
#     name: "Warn when approaching the 4095 selector limit for IE",
#     desc: "Will warn when selector count is >= 3800 selectors.",
#     browsers: "IE",
# 
#     //initialization
#     init: function(parser, reporter) {
#         var rule = this, count = 0;
# 
#         parser.addListener('startrule', function(event) {
#             count += event.selectors.length;
#         });
# 
#         parser.addListener("endstylesheet", function() {
#             if (count >= 3800) {
#                 reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule); 
#             }
#         });
#     }
# 
# });

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sasslint-0.0.1 lib/sasslint/rules/css/selector-max-approaching.rb