W3C home > Mailing lists > Public > www-style@w3.org > March 2003

Anonymous :blocks

From: Roger Larsson <roger.larsson@incrementa.se>
Date: Mon, 10 Mar 2003 00:52:24 +0100
Message-ID: <3E6BD3B8.1080101@incrementa.se>
To: www-style <www-style@w3.org>

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 GMT

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