Sunday, March 11, 2012

is not a valid value for the background-color

Hi everyone,

I get these error-messages for f.e. "DarkGreen" and "LightYellow" which are supposed to be web-safe.
These errors don't affect the running of the application but it's a bit enoying at designtime to have your error-list filled with those irrelevant ones.

Replacing the color-names with a #XXXXXX notation makes the messages disappear but this makes the style-sheet less readable (at least for me).

Anyone found a fix for this?


I always use the hex notation for colors, it doesn't cause those annoying errors. What you could do is add a comment to your CSS so that it is easier to read, of course this assumes you are using stylesheets and not inline styles.

For example:

body { background-color:#f0e68c; }/* Khaki */

-Damien

No comments:

Post a Comment