W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Phantom spaces

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Thu, 3 Feb 2000 20:37:04 +0100 (MET)
To: www-style <www-style@w3.org>
Message-ID: <14489.55012.445925.2315@lanalana.inria.fr>
Matthew Brealey writes:
> In:
> <BLOCKQUOTE cite="http://www.w3.org/TR/REC-CSS2/visuren.html#compact">
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
> <HTML>
>   <HEAD>
>     <TITLE>A run-in box example</TITLE>
>     <STYLE type="text/css">
>       H3 { display: run-in }
>     </STYLE>
>   </HEAD>
>   <BODY>
>     <H3>A run-in heading.</H3>
>     <P>And a paragraph of text that
>        follows it.
>   </BODY>
> </HTML>
> This example might be formatted as:
>   A run-in heading. And a
>   paragraph of text that
>   follows it.
> </BLOCKQUOTE>
> 
> , where has the space come from (between '.' and 'And')?

Good question.

I think there are two solutions:

   1. That space is not there by default and the designer will have to 
      add a rule

        H3:after { content: " " }

     Disadvantage: the 'run-in' becomes much harder to use.

   2. The space is added automatically (at least for languages that
      use spaces between words).

      Disadvantage: there is no way *not* to get a space.

In favour of (1) is also that you usally want to add not just a space
but also a period. The period in the example is typically not there in 
real-life documents...



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Thursday, 3 February 2000 14:37:08 GMT

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