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

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