Sha256: 4b731d7f32144cf324b862f6ebf870e3d4321d9b600e50843cae8200c5ecfea8

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 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 use more than 10 floats. If you do, there's probably
#  * room for some abstraction.
#  */
# /*global CSSLint*/
# CSSLint.addRule({
# 
#     //rule information
#     id: "floats",
#     name: "Disallow too many floats",
#     desc: "This rule tests if the float property is used too many times",
#     browsers: "All",
# 
#     //initialization
#     init: function(parser, reporter){
#         var rule = this;
#         var count = 0;
# 
#         //count how many times "float" is used
#         parser.addListener("property", function(event){
#             if (event.property.text.toLowerCase() == "float" &&
#                     event.value.text.toLowerCase() != "none"){
#                 count++;
#             }
#         });
# 
#         //report the results
#         parser.addListener("endstylesheet", function(){
#             reporter.stat("floats", count);
#             if (count >= 10){
#                 reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
#             }
#         });
#     }
# 
# });

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sasslint-0.0.1 lib/sasslint/rules/css/floats.rb