Sha256: ddad83a300dc1e2853c7e3b0d0436a1dacfea9e224b6e1df60abdbee379865fb
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 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 past the IE 4095 limit # */ # /*global CSSLint*/ # CSSLint.addRule({ # # //rule information # id: "selector-max", # name: "Error when past the 4095 selector limit for IE", # desc: "Will error when selector count is > 4095.", # 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 > 4095) { # 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.rb |