W3C home > Mailing lists > Public > www-style@w3.org > July 1996

Re: CSS and Eccentric Poems.

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Wed, 3 Jul 1996 21:11:46 +0200 (MET DST)
Message-Id: <199607031911.VAA07086@mygale.inria.fr>
To: preece@predator.urbana.mcd.mot.com (Scott E. Preece)
Cc: www-style@w3.org
Scott E. Preece writes:
 >  From: Carl Johan Berglund <f92-cbe@nada.kth.se>
 >  
 > | Bert Bos wrote:
 > | > This spacing is indeed too irregular for CSS1. Some sort of mark-up
 > | > has to be in the HTML; a <SPAN> seems logical, but a <BR> would work
 > | > as well, and is shorter to type:-)...
 > 
 > | >     spring<br class=gap1>when the world is mud-<br>
 > | >     luscious the little<br>
 > | >     lame baloonman
 > | 
 > | The problem here is that <br> is not a container--there is
 > | no </br> tag, so there is no content of the <br> that can
 > | be styled in any way. But setting the space between paragraphs
 > | to zero (as proposed) means you can do it with <p>.
 > ---
 > 
 > The standard appears to be ambiguous here.  The box formatting model is only
 > defined to apply to block-level elements and the WIDTH property is in
 > the "box properties" section of the standard, but it says explicitly
 > that it can be applied to "text elements," which doesn't seem to be
 > defined in either in CSS or in HTML 2.0.  So I don't think you could
 > count on being able to use DISPLAY=INLINE and WIDTH on BR (since setting
 > DISPLAY to other than BLOCK may disable box properties).

From the May 5 draft
(http://www.w3.org/pub/WWW/TR/WD-css1-960505.html):

    Value: <length> | <percentage> | auto 
    Initial: auto
    Applies to: all elements
    Inherited: no
    Percentage values: refer to parent's width

    This property can be applied to text elements, but it is most useful
    with inline images and similar insertions.
    [...]
    See the formatting model (section 4) for a description of the
    relationship between this property and the margin and padding.

The definition of the `width' property states that it applies to *all
elements*. The text further on indeed refers to the box formatting
model, but it also gives as example that it can be applied to an
inline IMG.

The phrase `text element' is not formally defined; `text' is only used
here to contrast with `image' in the same line.

 > I'm not sure whether P will work or not - at one point I understood the
 > formatting model to not support run-in text, implying that P had to
 > force a new line (at least if it's doing DISPLAY=BLOCK, which it has to
 > in order to assume WIDTH will work, as above).

CSS1 doesn't support run-in text (except by using float:left, which
sometimes gives the same effect...). But the example can be made to
work with P instead of BR as well (it's harder, but it's possible. Any
takers?)

 > The worse problem is that the standard allows the DISPLAY attribute to
 > be hardcoded by the browser, so either P or BR could fail to
 > work as expected. So it may not be possible to do reliable intra-line
 > spacing using the properties in CSS1 after all.

The current draft warns users for incorrect implementations. I don't
think it *allows* such implementations. The warning had its place when
CSS1 was being developed, but as it is getting closer to its final
form, the text should maybe be removed.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 93 65 77 71                 06902 Sophia Antipolis Cedex, France
Received on Wednesday, 3 July 1996 15:11:52 GMT

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