I love challenges!
It took me some time but I finally found it:
body {background:0} /* default */
@media not screen and (1) {
body {background:red} /* OP 11 */
}
@media not screen and (orientation) {
body {background:green} /* for the earlier versions of Opera that pick the first media query's rule + chrome/safari */
}
browsers tested:
- red: Opera 11
- green: Opera 10 and 10.5 + WebKit browsers
- none: Opera 9.26 + Firefox 3.6 + IE9
It's related to the error-handling and also the fact that NOT negates the global result (WebKit browsers don't evaluate orientation correctly without a valid value). Since orientation
is supported in presto 2.7 the second media query is FALSE.
The false orientation hack sounds like a good name to me.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…