

proposed element() CSS function

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 15 Jul 2008 17:46:46 +1200
Message-ID: <11e306600807142246m4076ba71v4af7f48ca877538f@mail.gmail.com>
I've updated my proposal:
with a rough outline of an "element()" CSS function that would overcome some
of the limitations of the CSS url() syntax.

Let me summarize the motivation:

We need a flexible way to reference subtrees of DOM documents. The CSS url()
syntax is inadequate for the following reasons:

   - url() values are relative to the CSS stylesheet so there is no way for
   an external stylesheet to reliably reference an element in the styled
   - An external url() reference refers to a "resource document" with a
   given URI. There is no way to reference an element in a subdocument of the
   styled document, such as a specific IFRAME. In general we may want to follow
   a path of subdocument references and external resource document references.
   - The SVG WG has already begun defining semantics for url()s with
   fragment references, which make it clear the referenced fragment must be
   interpreted in the context of the whole document. When we reference SVG
   paint servers from non-SVG content, we need to interpret the subtrees as
   isolated fragments.

Received on Tuesday, 15 July 2008 05:47:26 GMT
