So I am not sure if anyone cares about this but just in case. I was trying to use this test to see if attribute selectors were supported input[type='text'] but ie7 was saying that it didn't even though it did. So I checked out how http://www.css3.info/ was doing their selector tests and ripped out some of their stuff.

First I have styles defined for input[type='text'] {padding: 10px} in an external stylesheet that is loaded before Modernizr. Then I add this test: