There seems to be a difference between longhand properties (e.g. background-color
) and shorthand properties (e.g. background
). Some CSS hacks only work for one or the other. I’ve updated my test case to test these separately, and there are some interesting results.
The following hacks target IE8 but not IE9:
longhandproperty: \0value\0;
longhandproperty: \0value;
In practice, you might use these like so:
background-color: \0red\0;
background-color: \0red;
The following hacks target IE9 but not IE8:
shorthandproperty: \Bvalue\B;
shorthandproperty: \Bvalue;
shorthandproperty: \bvalue\b;
shorthandproperty: \bvalue;
In practice, you might use these like so:
background: \Bred\B;
background: \Bred;
background: \bred\b;
background: \bred;
Disclaimer: I wouldn’t recommend using these until more testing has been done.
I think we should promote/test the use of "tagging" the hacks with the targeted version. Like
prop: value \0/IE9;