9 ms·
Back when HTML only had a handful of basic color names ("red", "green", "gray", etc.), I recall there being a browser that, if you tried to use the spelling "gr
by re 10y ago
Back when HTML only had a handful of basic color names ("red", "green", "gray", etc.), I recall there being a browser that, if you tried to use the spelling "grey" would show the color green instead, since that was what it matched based on the first three letters of the word. The question reminded me of that, but I can't find any sources for it now--I guess it's a 20-year-old problem at this point.
- ubernostrum 10y agoAs of CSS3 there's no workaround needed; CSS3 adopted SVG's named-color palette, which defines both "gray" and "grey" and has both of them become rgb(128, 128, 128). The color-parsing algorithm which turns "chucknorris" into a color also will return rgb(128, 128, 128) for either spelling, since it specifies that any value which is a case-insensitive match for a CSS3 named color should just short-circuit resolve to that color.