Re: Substring matching attribute selectors

Gavin Sharp wrote:
> On Fri, Jun 20, 2008 at 8:12 PM, Alan Gresley <> wrote:
>> Just going the rounds with Gecko nightly 20 Jun 2008, I wondering what is
>> happening with those attribute selectors with empty strings.
>> Now class^="" and class$="" are showing non matches. No other implementation
>> does this. The CSS WG last made a resolution [1] about empty substring
>> selectors in April. This is what the latest nightly seems to be following.
>> [1]
> Yes, see (comment
> 16 and on).
> Gavin

Thanks Gavin, I now see the recent workings. It has been declared a bug 
by Mozilla since the CSS WG declared such empties string matches as 
invalid [1], but then this was retracted by the CSS WG [2] where they 
were considered valid but matched nothing. I then replied [3] that this 
could mean that any empty substrings would match if this was applied 
along with negation.

Indeed this is now the case.

No other implementation does this.

I devised this test series in late January 2008 and was built up by 
logical testing. If I knew that my attribute selector test series would 
start this issue with empty strings, I would never have devised such a 
test series in the first place.



Received on Saturday, 21 June 2008 05:18:35 UTC