In the beginning, there were three ways to specify colors:
hexadecimal format (# 3FC408) using three or six characters,
named colors (e.g. red , blue , black ) and
rgb() - in brackets you will have a numerical link for each of the colors (red, green and blue) from 0 to 255.
CSS3 has since added several new color formats, including:
rgba() - red, blue, green, alpha (opacity),
hsl() - hue, saturation and lightness and
hsla() - hue, saturation, lightness and alpha (opacity).
Although these new color formats bring more flexibility to how developers define colors and the relationships between them, it can also leave older browsers worse than expected due to incompatibilities.
The problem is that CSS parsers in browsers 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, any ads containing them will be deleted.
Consider the following:
.box { background: #000; color: rgba(100, 100, 200, 0.5); }
Supported browsers will process this CSS as described. Unsupported browsers will completely lose the color property because the meaning is not understood. This means that the actual color used will be inherited from the surrounding context and may actually turn out to be black (just like the background). To prevent this, you should always include the fallback color in hexadecimal, named, or rgb () format, for example:
.box { background: #000; color: blue; color: rgba(100, 100, 200, 0.5); }
What ReSharper asked you to do was provide backup color. This replacement color should always be in front of the new color so that previous browsers see and use it correctly, and new browsers continue to use the newer color format.
Additional Information:
https://github.com/stubbornella/csslint/wiki/Require-fallback-colors
source share