I'm working with an old CSS stylesheet and several of the entries are similar to:
.calibre18 {
color: windowtext;
font-family: "Book Antiqua", "serif";
font-size: 1.29167em;
line-height: 1.2;
}
This keeps erroring out on color: windowtext;
I find that it has been deprecated "in favor of the CSS3 UI appearance
property". Unfortunately, that seems to be deprecated as well.
How can I recreate the authors original intent?
The old CSS2 system color names have been deprecated for a couple reasons:
These color names have been deprecated, however, as they are insufficient for their original purpose (making website elements look like their native OS counterparts), and represent a security risk, as it makes it easier for a webpage to "spoof" a native OS dialog.
As seen at http://dev.w3.org/csswg/css-color-4/#system-colors
Another relevant quote:
User agents must support these keywords, but should map them to "default" values, not based on the user’s OS settings (for example, mapping all the "background" colors to white and "foreground" colors to black). Authors must not use these keywords.
IMHO, you shouldn't try to recreate the authors' original intent nor rely on user agents' default support but define actual colors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With