Long time no see – unknown IE bug

It’s really been quite a long time since I discovered a bug in IE’s CSS parsing that I didn’t know. I’m not saying that I don’t encounter bugs on a daily basis, but I know what they are and I avoid them accordingly as per Andy’s 4th3rd law of bug hunting. As I didn’t know it existed I didn’t know if they corrected the problem in IE7 but it seems they have – it’d be nice if someone checked the case and report it.

The bug is in parsing CSS files with #id.class formed selectors. It seems that when you have only one in the CSS file it works ok. You can see this in the before section of the case. After you add an additional #id.class rule before it the second one fails.

It’s pretty annoying since I had an element with an id that was one of the rare color coded elements on a site. When I wanted to change the colors with #element.color it didn’t work in IE (yes, I know that .color might not the best idea but believe me, in this case it is). When I wanted to change this to .element.color I found out that this is also broken so under pressure of time I solved it with YAWE (Yet Another Wrapper Element). It works but is a bit uglier.

In about 4 years time I won’t need to think about this anymore…

Leave a Reply