Re: [css3-images] CSS element reference identifier

(12/02/06 16:46), Tab Atkins Jr. wrote:
> So, I'm changing it to just accept id selectors, 

For what it's worth, Examples 9, 10, 11 haven't been changed to reflect
this.

(12/02/07 19:14), Tab Atkins Jr. wrote:
> 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.

I think you already need to say this now as an ID selector can actually
match multiple elements. This is matching Firefox's behavior. Test case:

data:text/html,<style>%23a {color:red;}</style><span
id="a">A</span><span id="a">B</span><p style="white-space:pre;
background-image: -moz-element(%23a);"> </p>

gives A as the background.


Cheers,
Kenny

Received on Wednesday, 8 February 2012 19:43:09 UTC