-
Notifications
You must be signed in to change notification settings - Fork 479
Closed
Description
Name: CSS3 Colors
Rule: When using CSS3 colors, a fallback color should be provided for browsers which don't support them.
Affected Browsers: IE6, IE7, IE8
Source: http://caniuse.com/#css3-colors
Failing example:
.rgba {
color: rgba(0, 0, 0, 0.5);
}
.hsl {
color: hsl(0, 0%, 0%);
}
.hsla {
color: hsla(0, 0%, 0%, 0.5);
}Passing example:
.rgba {
/* Fallback with RGB */
color: rgb(0, 0, 0);
color: rgba(0, 0, 0, 0.5);
}
.hsl {
/* Fallback with hex */
color: #000;
color: hsl(0, 0%, 0%);
}
.hsla {
/* Fallback with constant */
color: black;
color: hsla(0, 0%, 0%, 0.5);
}