W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: [selectors4] Open issues

From: Simon Pieters <simonp@opera.com>
Date: Wed, 24 Apr 2013 12:26:26 +0200
To: www-style@w3.org, "Simon Sapin" <simon.sapin@exyr.org>
Message-ID: <op.wv1jacqhidj3kv@simons-macbook-pro.local>
On Tue, 09 Apr 2013 13:19:47 +0200, Simon Pieters <simonp@opera.com> wrote:

> On Tue, 09 Apr 2013 09:35:27 +0200, Simon Sapin <simon.sapin@exyr.org>  
> wrote:
>> Le 09/04/2013 01:22, fantasai a écrit :
>>> ISSUE-316:http://www.w3.org/Style/CSS/Tracker/issues/316
>>>     Should ID selectors accept all HASH tokens instead of #ident only?
>>>     http://lists.w3.org/Archives/Public/www-style/2013Feb/0437.html
>>>     Pros: Merge quirks and non-quirks parsing.
>>>     Cons: We have interop on #ident.
>>>     See:http://lists.w3.org/Archives/Public/www-style/2013Feb/0449.html
>>>     Side-question: If we don't accept this, should this quirk be
>>>                    described in Selectors 4?
>> Should quirks be described: yes, always, IMO.
> Not if we want to drop the quirk. This quirk is not present in  
> Firefox/Safari/Chrome. That means we can drop it.

An argument to change this anyway would be that it's annoying to escape  
numbers in selectors, so it would be nice if this would work:

<div id="1"></div>

#1 { color:green }

However, if we make that work, authors will assume that classes starting  
with numbers also work:

<div class="1"></div>

.1 { color:green }

However, .1 is tokenized as a NUMBER, while .1foo would be DELIM +  
DIMENSION. Allowing classes to start with a number seems quite messy, so  
let's not do that. I think we should keep id selectors and class selectors  
consistent, i.e. keep the spec as is.

>> This case is a bit weird as it is the "non-quirks" parsing (#ident)  
>> that requires extra effort in both specs and implementations.
>> I’m in favor of doing the simpler thing (always parsing as HASH) if  
>> there is no web-compat risk, but I don’t know how to assess that.
> Likely there are pages that rely on the quirk not being present in  
> standards mode as a way to target old IE, or some such.

Simon Pieters
Opera Software
Received on Wednesday, 24 April 2013 10:27:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:28 UTC