- From: Bert Bos <bert@w3.org>
- Date: Wed, 7 Mar 2012 23:08:16 +0100
- To: W3C style mailing list mailing list <www-style@w3.org>
On Mar 1, 2012, at 03:21, fantasai wrote:
> On 02/29/2012 04:10 PM, Tab Atkins Jr. wrote:
>> On Wed, Feb 29, 2012 at 3:57 PM, Simon Fraser<smfr@me.com> wrote:
>>>
>>> element() in the CSS Image case doesn't immediately strike me
>>> as meaning a snapshot of the targeted element. Maybe we should
>>> use something more descriptive, like:
>>>
>>> snapshot() (even though it updates)
>>> replica()
>>> element-image()
>>> imageof()
>
> I think this is a good usability point.
Did somebody already suggest to just use url() and image()?
url(#foo) refers to the element with ID foo in the current document.
Because it's a URL, you can even use Xpointer to refer to elements without IDs. And there is a Community Group[1] that is proposing to extend Xpointer to allow CSS selectors and not only XPath.
And a second advantage: If you can use url(), then you can automatically also use attr(), because attr() can be a URL, too:
A:local-link:after { content: "(" attr(href, url) ")" }
(And a possible third advantage: If you use url() and attr(), then you can also use the target-text() that GCPM proposes in case you want just the text of the referenced element and not the style.)
[1] http://www.w3.org/community/cssselfrags/
Bert
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert@w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Wednesday, 7 March 2012 22:08:43 UTC