Sha256: 37f945bbb70984e03068cfe82e0e0a200324b41d55d1181a173a53531eece50c
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 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 don't need to specify units when a value is 0. # */ # /*global CSSLint*/ # CSSLint.addRule({ # # //rule information # id: "zero-units", # name: "Disallow units for 0 values", # desc: "You don't need to specify units when a value is 0.", # browsers: "All", # # //initialization # init: function(parser, reporter){ # var rule = this; # # //count how many times "float" is used # parser.addListener("property", function(event){ # var parts = event.value.parts, # i = 0, # len = parts.length; # # while(i < len){ # if ((parts[i].units || parts[i].type == "percentage") && parts[i].value === 0 && parts[i].type != "time"){ # reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule); # } # i++; # } # # }); # # } # # });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sasslint-0.0.1 | lib/sasslint/rules/css/zero-units.rb |