Re: vertical-align content-generated image?

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 UTC