In a recent test with Internet Explorer’s conditional comments, some of the more complex operators didn’t seem to work. For example, trying to target IE 6 and 7 defensively, this ‘and’ operator should work:
<!--[if (gte IE 6)&(lt IE 8)]> [import this style sheet] <![endif]––>
However, that didn’t seem to work when testing in virtual machines, only the first part did. It was the same for the ‘or’ version as well, it just counted as greater than or equal to Internet Explorer 6.
Since we can’t move CSS based conditional comments into the CSS, what did work in our testing was this slightly inelegant nested version:
<!--[if lt IE 8]> <![if gte IE 6]> [import this stylesheet.] <![endif]> <![endif]––>
Can anyone else replicate this? I’ve a quick test page to see if you can point a 5.5 / 6 / 7 / 8 IE browser at it.