Anonymous :blocks

Reposting my comments again since I posted them before using the wrong 
emailaddress:
-----------------------------------------

   The CSS 2.1 specification states that every inline element has to be
put inside an anonymous block if there is at least one block sibling.
This seem to limit the expressivness. Suppose we have the following XML:

<name>
      <first-name> Roger </first-name>
      <last-name> Larsson </last-name>
</name>

it would be possible to have the layout (generated "Name:" as :block and
anonymous :blocks wrapping "Roger" and "Larsson")

Name:
Roger
Larsson

OR (all :inline)

Name: Roger Larsson

but NOT

Name:
Roger Larsson

by using

name {display:block}
name:before {display:block; content:"Name:"}

I have noticed that web browsers do not seem to generate those anonymous
:blocks. That mean my implementation would be incompatible to either the
specification or existing browsers.

Received on Sunday, 9 March 2003 18:53:49 UTC