How May I Direct Your Call | Main | XUL vs SilverLight

October 3, 2007

The world is Grey/Gray

I've always been confused about the correct English spelling of that color between white and black. But it turns out, browsers are sometimes confused as well.

Firefox supports both gray and grey, as well as lightgrey and lightgray.

Internet Explorer only supports gray. And to confuse me even more, it only supports lightgrey. And if you try to set lightgray using js, you get an exception (Invalid Property Value). Which took a bit to figure out today as part of a bug.

If only the world were black and white.

Posted by doron at October 3, 2007 7:37 AM

Comments

The CSS validator seems to reject a lot (if not all) colour values as well. I find it best to avoid them, or use them for development and then replace all using one of the thousands of colour charts that give you the hex equivalent.

Posted by: Ben Basson at October 3, 2007 8:25 AM

As a Brit I'd say it's 'grey', but seen as the HTML/CSS word 'colour' is spelt 'color' then the logical spelling would be the US 'gray'...

Posted by: Alan at October 3, 2007 10:17 AM