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

Re: Referring to elements from CSS. (In, but not limited to [css-images-4] and [css-gcpm])

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 2 Oct 2013 11:30:33 -0700
Message-ID: <CAAWBYDB0DNgTGmkt4eCpY6Ko037pv7_jga9vrLWdJcS4xgt5=g@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style list <www-style@w3.org>
On Wed, Oct 2, 2013 at 10:48 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> To sum up, css-ui-3 uses the same mechanism as css-images-4, ID selectors.
> (The latter adds an element() function, but that’s just for disambiguation
> with other image values.)

Correct.  And yeah, element() exists partially to disambiguate an ID
selector from a hash color, as colors and images are often used
together in grammars, and also to allow the possibility of putting in
more controls later if needed.

On Wed, Oct 2, 2013 at 11:06 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Le 02/10/2013 19:04, Tab Atkins Jr. a écrit :
>> On Wed, Oct 2, 2013 at 1:48 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
>>> If we have to deal with defining how fragments map to elements anyway, I
>>> don’t see a point in keeping ID selectors for this.
>>
>> This is also acceptable to me.  The reason I suggested it, though, was
>> so that the usages in GCPM with attr() would still be valid.  Those
>> seem useful!
>
> I’m not sure what you mean here. URLs work nicely with attr(), not ID
> selectors.

Oh, sorry, I misread your statement.  You were saying the exact
opposite of what I thought. ^_^

Anyway, ID selectors are easier to write when doing so literally.
URLs are easier to use when interfacing with the document language.
Both have their advantages.

(Note: We probably want to add an 'idref' type to attr() to handle the
remaining document language references.  It'll translate to an id
selector, maybe?)

~TJ
Received on Wednesday, 2 October 2013 18:31:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 2 October 2013 18:31:21 UTC