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

Re: Style rules to emulate BR (was: HR)

From: Jan Roland Eriksson <jrexon@newsguy.com>
Date: Sun, 18 Feb 2001 17:20:18 +0100
To: www-style@w3.org
Message-ID: <jamv8t8he0v4mp0ggn9oi3ffc2hhhjkesr@4ax.com>
On Sun, 18 Feb 2001 03:09:21 -0800 (Pacific Standard Time), Ian Hickson
<ian@hixie.ch> wrote:

>On Sun, 18 Feb 2001, Jan Roland Eriksson wrote:

>>> This group has a long history of shooting down proposed CSS rules for
>>> styling the default look of <br> elements
>>> What is wrong with the following?
>>>   br {
>>>     display: block;
>>>   }
>> Well, there's nothing to apply a style to in the first place.
>> Or are you thinking of a possibility to apply style to a control
>> character? Can a control char really be thought of as occupying a
>> character cell box?
><br/> is an empty element, just like <foo/> and <bar/>. It is not a
>control character.

Traditionally BR represents "platform specific generated content" that
is to replace the position marked and occupied by <BR>.

>Maybe you were thinking of <br> as an entity reference?

No entity refs, <BR> (or <br> or <br/> if you like) as such.

First of all, the whole business of 'empty' elements is a subject that
since long time back has been discussed in the SGML community without
arriving at some sort of solution.

The fact remains that CSS offers a way to suggest...

  "rendering qualities to properties of an elements content"

...and BR has no content, thus there are no content properties available
to assign values to in the first place, except possibly the established
default of _generating_ content for it in the form of platform dependent
control chararcter(s) that restarts continued rendering down on a new
line, while satisfying the clear attribute in the process.

>> Browsers are supposed to interpret a BR as a command to move the next
>> point of content rendering to a 'new line'.
>No, browsers are free to interpret <br> however they like, the semantics
>of the element per HTML4 are "The BR element forcibly breaks (ends) the
>current line of text".

Yes, the formal prose has been muddled up a bit since RFC1866;

 5.8. Line Break: BR
  "The <BR> element specifies a line break between words
  (see 6, 'Characters, Words, and Paragraphs')"


>> Btw, this "works" as something of a BR replacement in Win Moz 0.7
>>   SPAN.sbr       { white-space: pre; }
>>   SPAN.sbr:after { content: "\A"; }
>>   <P>Some text here<SPAN CLASS="sbr"></SPAN
>>     >Some more text that will appear on a next line of its own.</P>

>Right. But that doesn't cover the semantics of "clear".

That could be added of course.

>I was wondering if my proposed rules would cover both
> -- can you see any reason why not?

No not really, if you really need a default CSS def for BR.

It's just that I'm a bit allergic to elements defined as empty and I
think about CSS as styling content, not tags.

Possibly it's your - br { display: block; } - that is supposed to
indicate at least an empty box to apply some further styling to.
In which case it would be interesting to find out what is supposed to
happen if we also specify margin, border and padding for that box?

That could open up for some "interesting" line breaks for sure :)

Jan Roland Eriksson <rex@css.nu> .. <URL:http://css.nu/>
Received on Sunday, 18 February 2001 11:23:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:56 UTC