Experiences on the Front Lines of User Interfaces and Web Development

Browser quirks: invalid CSS color syntax

I had a typo in CSS, which led me to discover that the following css works in Chrome but not Firefox:
.my_text {
  color: #white;
}
<span class="my_text">Should be white text?</span>
Obviously the valid CSS would be either color: white or color: #ffffff but Chrome allows a mixture which may be dangerous if you are developing in Chrome and don't realize you have an invalid CSS style.

Note: Using Chrome 5.0 for Mac and Firefox 3.6 for Mac.
comments powered by Disqus