Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Grey or gray. Use one or the other, not a mix #217

Closed
wolf99 opened this Issue Dec 23, 2011 · 2 comments

Comments

Projects
None yet
3 participants

wolf99 commented Dec 23, 2011

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 could 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 this is only the case with legacy browsers (AFAIK) CSSLint is supposed 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;}

Contributor

nzakas commented Dec 29, 2011

Most likely a typo.

@nzakas nzakas closed this in fb3f926 Jan 4, 2012

cwallen commented Dec 12, 2012

Still warning on darkgrey.

Require use of known properties: Expected end of value but found 'darkgrey'.
border: 1px solid darkgrey;

wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-Wikibase that referenced this issue Dec 8, 2016

Make "0 references" headers in no-JS view gray
This does not have an effect when JS is enabled. But it is visible on
diffs and old revisions, as well while the page is loading. The gray is
the same as the entity ID in the title.

I'm touching all the other gray because of consistency, see
CSSLint/csslint#217

Change-Id: I29a0c1f376e9f0fc7381e2e690a309a50cb48466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment