[CSS3-attribute] Attribute selectors [att|=val]

In reference to this Fantasais' message:

http://lists.w3.org/Archives/Public/www-style/2008Mar/0166.html

Concerning the spec about the attribute value is a hyphen-separated list.

http://www.w3.org/TR/css3-selectors/#attribute-representation

It says:

|Represents an element with the att attribute, its value either 
|being exactly "val" or beginning with "val" immediately followed 
|by "-" (U+002D)


Now getting this correct in my test case for a match.

http://css-class.com/test/css/selectors/attribute-match.htm


I have these examples.

p.-test38[class|=""] class="-test38"  ---matches---

p.test39-[class|=""] class="test39-"  ---does not match---


The wording of the spec indicates that the former (test 38) should 'not' match and the later (test 39) should match.


In my test case for a non-match:

http://css-class.com/test/css/selectors/attribute-no-match.htm


I have these examples.

p.-test38[class|=""] class="-test38"  ---matches---

p.test39-[class|=""] class="test39-"  ---does not match---

The wording of the spec indicates that the former (test 38) should 'not' match and the later (test 39) should match.


Opera 9.5, Safari 3.1 and and Firefox 3.04 is consisted in matching the former cases and not the later.

I have also included the examples.


div.test40 [class|=""] class=""  ---matches---
div.test41 [class|=""] class="foo"  ---does not match---


I have been trying for the last two days to find the message where Fantasai mentions such examples. Where can I find this message? Can anyone please provide a link for my benefit.

IE8 will show a match or no match in both the later examples (test 40 and 41) in both test cases.

Can anyone please either confirm if I'm correct or incorrect in either test case. I am aware that both of these cases are fringe cases. :-)


Alan

http://css-class.com/test/

Received on Saturday, 22 March 2008 10:49:00 UTC