Provide fallback colors when working with CSS3

As this great article explains:

In the beginning, there were three ways to specify colors: in hexadecimal format, using either three or six characters, named colors such as red, and rgb(). CSS3 has since added several new color formats including rgba()hsl(), and hsla(). While these new color formats bring a remarkable amount of flexibility to how developers define colors and the relationships between them, it can also leave older browsers looking worse than expected.

The problem is that CSS parsers in browsers will skip a property whose name or value is not understood. Older browsers such as Internet Explorer 8 and earlier, do not understand rgba()hsl(), or hsla(), and as a result will drop any declarations containing them.

Leave a Reply

Your email address will not be published. Required fields are marked *