- From: Estelle Weyl <estelle@weyl.org>
- Date: Sun, 4 Jul 2010 00:50:21 -0700
- To: "www-style@w3.org CSS" <www-style@w3.org>
img[src*=photo]:nth-of-type(odd) is selecting every odd image in the document, then checking to see if the attribute has the word photo. Is that correct according to the spec? I tried many configurations, including img[src*=photos]:nth-of- type(odd):not([src*=thumb]) No matter the source order, the first thing the browser selects is img:nth-of-type, before checking the attribute. My assumption is that :nth-of-type, being a pseudo-class, has greater specificity than the attribute selector, but then shouldn't the :not pseudo have equal weight? I reversed the order, nothing seems to work. The sandbox is here: http://www.standardista.com/sandbox/selectors_test.html Don't see in the specifications what order should take precedence. I think this is something that may need to be clarified. -Estelle http://www.standardista.com
Received on Sunday, 4 July 2010 07:50:34 UTC