W3C home > Mailing lists > Public > www-style@w3.org > September 2002

Re: CSS2.1: \A and white-space

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Fri, 06 Sep 2002 10:56:38 -0700
To: Bert Bos <bert@w3.org>, <www-style@w3.org>
Message-ID: <B99E3A65.169C4%tantek@cs.stanford.edu>

On 9/6/02 10:02 AM, "Bert Bos" <bert@w3.org> wrote:

> 
> Tantek Çelik writes:
> 
>> E.g.
>> 
>> br { line-break-after:always }
> 
> That would have been my preferred solution, but we never could get it
> to work. The BR element, as implemented by Netscape long ago, behaves
> in a strange way. It doesn't just cause a line break, it creates empty
> lines as well, when there are several BRs in a row.
> 
> You cannot fix that by saying that 'line-break-after: always' inserts
> both a zero-width space and a line break, because then
> 
>   A, B {line-break-after: always}
> 
>   <A>... <B>...</B></A>
> 
> would cause an empty line.
> 
> If anybody can come up with a definition where
> 
>   A {line-break-after: always}
> 
>   <A><A></A></A>
> 
> causes no empty line, while
> 
>   A {line-break-after: always}
> 
>   <A></A><A></A>
> 
> does, then I'd be happy.

First there is the question of whether emulating this particular ancient
browser quirk in CSS is even important anymore, since there are so many
better mechanisms (e.g. margin, padding) to add white space _properly_,
rather than with markup cheese like <br><br> or <spacer>.

I'd say that in this day and age of CSS2.1 and CSS3, being able to style
<br><br> to produce the same formatting result as that introduced years and
years ago is a non-requirement.  Why would we want to encourage people to
continue to use bad markup?


Second, what about this?

 br { display:inline; line-break-after:always }
 br+br { display:block; height:1em }


Tantek
Received on Friday, 6 September 2002 13:46:40 GMT

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