W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css3-images] CSS element reference identifier

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 7 Feb 2012 03:14:54 -0800
Message-ID: <CAAWBYDA=+xe1K+A5jn1B5jdtHFrhvU8vXgxTioWSJOKzkQh87g@mail.gmail.com>
To: robert@ocallahan.org
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
On Mon, Feb 6, 2012 at 9:33 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Mon, Feb 6, 2012 at 9:46 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> Elika and I were recently discussing this, and realized that having
>> the element reference identifier use the current grammar (as a bare
>> IDENT) is future-hostile, as we plan to eventually extend it to accept
>> arbitrary selectors, and IDENTs collide with tagname selectors.
>
> We've discussed this at least a couple of times before ... I think that if
> you want to have something that can use arbitrary selectors, you should
> define a new function elements() that takes a selector and can handle
> multiple matched elements, and does not consult the CSSElementMap at all.

I think element() is fine as an analogue to .find() in JS, and
elements() (when we need it) will be an analogue to .findAll().  When
element() grows to accept an arbitrary selector, it'll just return the
first matched element.

~TJ
Received on Tuesday, 7 February 2012 11:19:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT