I'd change it a little, though. "hack" has such ugly connotations. A quick check of the CSS grammar found that media types follow the "ident" syntax. What that means is that the existing convention for vendor-specific CSS properties may be followed here too, i.e. "-moz", "-o", "-khtml". ("-msie"?)
For example:
Code: Select all
@import url(operasp.css) -o-screen,-o-projection;
@import url(mozscreen.css) -moz-screen;
@media -msie-print {
/* MSIE print styles */
}
<link rel="stylesheet" type="text/css" media="-khtml-all" href="khtml.css" />
I think that looks much better, is consistent with the existing conventions, and allows targetting of styles to specific rendering engines. However, given the original suggestion was made in 2002, I don't hold much hope of this happening soon.
Is this the right place to suggest these sort of enhancements?