CSS color names error

Hi,

Just came across the following funny error. Took me some time to figure out what it was, but here it comes:

In CSS Gray and DarkGray is used for gray/grey, but LightGrey (notice the E instead of A).

Intellij marks LightGray as a color (in css files), and not LightGrey.

Colorcodes used by css: http://www.w3schools.com/css/css_colornames.asp

About grey and gray: http://www.bernzilla.com/item.php?id=232

0
4 comments

Hi,

There was request on removing the duplicate entries for the same color.

Alexander wrote:

Hi,

Just came across the following funny error. Took me some time to figure out what it was, but here it comes:

In CSS Gray and DarkGray is used for gray/grey, but LightGrey (notice the E instead of A).

Intellij marks LightGray as a color (in css files), and not LightGrey.

Colorcodes used by css: http://www.w3schools.com/css/css_colornames.asp

About grey and gray: http://www.bernzilla.com/item.php?id=232



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Even if "grey" isn't offered as completion, it should still be recognized as a correct one
if the browsers do.

Slightly OT, but related to CSS-colors: I think the color-completion could be improved by
grouping real colors and pseudo-colors and especially by making the "choose color..."
option the first one in the list.

http://www.jetbrains.net/jira/browse/IDEA-484

Sascha

0

I would say that the named colors should be limited to the ones in the
CSS2 spec. For the rest, it would be better to substitute numeric value
(and no, grey, darkGrey and darkGray are not valid.) The invalid, but
recognized color names could be marked as warnings with intention to
substitute them with the RGB value.


http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

" The list of keyword color names is: aqua, black, blue, fuchsia, gray,
green, lime, maroon, navy, olive, purple, red, silver, teal, white, and
yellow. These 16 colors are defined in HTML 4.0 ().

In addition to these color keywords, users may specify keywords that
correspond to the colors used by certain objects in the user's
environment. Please consult the section on system colors for more
information."



http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

"In addition to being able to assign pre-defined color values to text,
backgrounds, etc., CSS2 allows authors to specify colors in a manner
that integrates them into the user's graphic environment.
....
ActiveBorder, ActiveCaption, AppWorkspace, Background, ButtonFace,
ButtonHighlight, ButtonShadow, ButtonText, CaptionText, GrayText,
Highlight, HighlightText, InactiveBorder, InactiveCaption,
InactiveCaptionText, InfoBackground, InfoText, Menu, MenuText,
Scrollbar, ThreeDDarkShadow, ThreeDFace, ThreeDHighlight,
ThreeDLightShadow, ThreeDShadow, Window, WindowFrame, WindowText"



Dimitar

0

Hi,

We actually support the colors this way.

dimitar wrote:

I would say that the named colors should be limited to the ones in the
CSS2 spec. For the rest, it would be better to substitute numeric value
(and no, grey, darkGrey and darkGray are not valid.) The invalid, but
recognized color names could be marked as warnings with intention to
substitute them with the RGB value.


http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

" The list of keyword color names is: aqua, black, blue, fuchsia, gray,
green, lime, maroon, navy, olive, purple, red, silver, teal, white, and
yellow. These 16 colors are defined in HTML 4.0 ().

In addition to these color keywords, users may specify keywords that
correspond to the colors used by certain objects in the user's
environment. Please consult the section on system colors for more
information."



http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

"In addition to being able to assign pre-defined color values to text,
backgrounds, etc., CSS2 allows authors to specify colors in a manner
that integrates them into the user's graphic environment.
....
ActiveBorder, ActiveCaption, AppWorkspace, Background, ButtonFace,
ButtonHighlight, ButtonShadow, ButtonText, CaptionText, GrayText,
Highlight, HighlightText, InactiveBorder, InactiveCaption,
InactiveCaptionText, InfoBackground, InfoText, Menu, MenuText,
Scrollbar, ThreeDDarkShadow, ThreeDFace, ThreeDHighlight,
ThreeDLightShadow, ThreeDShadow, Window, WindowFrame, WindowText"



Dimitar



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.