Re: [selectors4] Open issues

On Wed, Apr 17, 2013 at 4:52 PM, Zack Weinberg <zackw@panix.com> wrote:
> On Wed, Apr 17, 2013 at 6:26 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>>> ISSUE-316: http://www.w3.org/Style/CSS/Tracker/issues/316
>>>    Should ID selectors accept all HASH tokens instead of #ident only?
>>
>> Added issue to spec until we resolve this:
>>   http://dev.w3.org/csswg/selectors4/#id-selectors
>
> The note you added to the spec includes the statement "Note that HTML5
> loosened the definition of valid ids to allow things starting with
> numbers, etc."  That seems to correspond to this text in
> http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute
> :
>
>> The value must be unique amongst all the IDs in the element's home subtree and must contain at least one character. The value must not contain any space characters.
>
> That's even more lax than HASH.  I would normally think it appropriate
> for CSS to defer to HTML5 on this sort of thing (and I do think the
> principle of least surprise says that whatever can go in id="...", CSS
> should be able to match it with #...; and I'm always in favor of
> getting rid of quirks, ceteris paribus) but there's no way we can be
> *that* lax.  Maybe both specs need to change here.

Right, it's looser, but I don't think we want to special-case it
sufficiently that we go past the confines of the hash token.  I'm
satisfied with using escapes at that point.

~TJ

Received on Thursday, 18 April 2013 02:15:54 UTC