stubbornella/csslint — Issue #217: Grey or gray. Use one or the other, not a mix
Author: wolf99
Created: 2011-12-23 20:10:19+00:00
State: open

CSS spec 2.1 and recommendation 3 specify 'gray' only.
They do not directly specify light or dark varieties of this color.
CSS3 extended keywords (read x11) spec both versions of the color and its varieties as the same.
I.E. lightgrey = lightgray; darkgrey = dark gray; grey = gray.

CSSLint is inconsistent in the usage it recommends. It should pick one spelling and stick with it. personally I would chose gray as it is CSS backwards compatible and is more correct as a core keyword rather than on extended keyword. It also fits with the US-english used throughout the rest of the CSS specs and recommendations.
(being british I actually find 'grey' and 'colour' more natural, but the standard is in US-en, so...)

I know this has come about because of previous inconsistent browser support, but CSS2 and 3 do spec gray, and thi is only the case with legacy browsers (AFAIK) CSSlint is suposed to be recommending the best and most correct CSS possible, right? Not conforming to legacy browser anachronisms.

Example of CSSLint inconsistency:
CSS:

.content{color: grey;}
.content{color: gray;}
.content{color: lightgrey;}
.content{color: lightgray;}
.content{color: darkgrey;}
.content{color: darkgray;}

Returns:

1: 10: Require use of known properties: Expected color or one of (inherit) but found 'grey'.
.content{color: grey;}
4: 10: Require use of known properties: Expected color or one of (inherit) but found 'lightgray'.
.content{color: lightgray;}
5: 10: Require use of known properties: Expected color or one of (inherit) but found 'darkgrey'.
.content{color: darkgrey;}