W3C home > Mailing lists > Public > www-style@w3.org > June 2001

Re: vertical-align content-generated image?

From: fantasai <fantasai@escape.com>
Date: Sat, 02 Jun 2001 19:03:39 -0400
Message-ID: <3B1970CB.6188AC14@escape.com>
To: www-style@w3.org
Bjoern Hoehrmann wrote:
> 
> I think one approach to this could be to introduce an optional second
> argument to the content property like
> 
>    #q:before { content: url(image.gif), myImage }
> 
> and some selector to select this generated content, e.g.
> 
>   ::generated-content(myImage) { vertical-align: "somewhere ;-)" }

That will get very unweildy with multiple bits of content, since
'content' takes a space separated list.

You could, however, put a closer association between the name
and the content it refers to like this:

  #q:before { content: prae['begin'] image[url(image.gif)] post['end'];
}
  ::generated-content(prae) {stuff}
  ::generated-content(image) {other stuff}

> 
> I think this could be easily implemented if the user agent uses a DOM
> structure to represent the current document and simply adds a new img
> node (if in an XHTML document) before the selected element. The
> generated content then is just another element that could easily be
> selected.

'content' can't modify the document tree. CSS is supposed to be just for
styling the document, not changing it. :)

"Generated content does not alter the document tree."
--http://www.w3.org/TR/REC-CSS2/generate.html#content
Received on Saturday, 2 June 2001 19:01:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:09 GMT