W3C home > Mailing lists > Public > public-css-testsuite@w3.org > April 2008

Re: Test of empty substring-matching attribute selectors

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 02 Apr 2008 09:50:00 -0700
Message-ID: <47F3B938.20804@inkedblade.net>
To: Bert Bos <bert@w3.org>
CC: public-css-testsuite@w3.org

Bert Bos wrote:
> This test:
> 
>     http://www.w3.org/Style/Examples/013/css3-selectors-0603-empty.html
> 
> tries to test substring-matching attribute selectors ~=, |=, ^=, *=, $= 
> (Selectors section 6.3[1]) with empty values, such as p[title^=""].
> 
> It assumes that such selectors are valid (i.e., not ignored) but match 
> nothing. I think that is what we decided last week[2]. I'm not sure if 
> we decided anything for |=, but it seems consistent to treat it the 
> same way.
> 
> This test:
> 
>     http://www.w3.org/Style/Examples/013/t050801-empty-attr-01.html
> 
> is the same, except that it only tests ~= and |=, and is thus suitable 
> for CSS level 2, section 5.8.1[3].
> 
> [1] http://www.w3.org/TR/css3-selectors/#attribute-selectors
> [2] http://www.w3.org/2008/03/28-css-irc.html#T00-52-44
> [3] http://www.w3.org/TR/CSS21/selector.html#matching-attrs

Bert, [attr|=""] is not an ambiguous (match everything or match nothing)
case. It is very clear from the existing definition that it should match
   attr=""
   attr="-foo"
   attr="-"
and not
   attr="foo--"
   attr="foo"

~fantasai
Received on Wednesday, 2 April 2008 16:50:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:56 GMT