Re: Inline h*ll

--- Ian Hickson <py8ieh@bath.ac.uk> wrote:
> On Thu, 13 Jan 2000, Matthew Brealey wrote:
>  
> > I've just realised what the problem is. I see what you mean - the
> > difference is in our respective interpretations of <br>. We were
> > both working on the same basis - the only difference is with <br>,
> > but I was going on the basis of: [snip CSS1]
> 
> Consider CSS1 to be superseded. CSS2 changes quite a few minor things
> like this, so it is best to use it as a reference.

There's nothing in the (admittedly informative) changes section.

> 
> > On the basis that CSS 2 doesn't say anything about BR
> 
> Nothing normative, at any rate. You can treat BR as an empty inline
> element with this style:
> 
>    BR:before { 
>       content: '\A';
>       white-space: pre;
>    }
Indeed, (an error in <URL:http://www.w3.org/TR/REC-CSS2/sample.html>,
incidentally - no pre).

I am fairly convinced, that the CSS 1 statement must stand since there is
nothing at all in CSS 2 on the subject - so prefer to use a normative
(although not current) definition to one that has never had official
credence.

In addition, here's a proof that <br> must be treated for line box height
calculations in the same way as an unforced break:

1. For <br> to be considered, it must either be goverened by the rules of
replaced or non-replaced element.
2. Non-replaced elements contain content that is used directly (not
replaced). <br> therefore is not non-replaced.
3. Replaced elements:

<q cite="http://www.w3.org/TR/REC-CSS2/visudet.html#q16">
10.6.2 Inline, replaced elements block-level, replaced elements in normal
flow, and floating, replaced elements

If 'height' is 'auto', the computed value is the intrinsic height. 
</q>
<q cite="http://www.w3.org/TR/REC-CSS2/conform.html#intrinsic">
Intrinsic dimensions 
The width and height as defined by the element itself, not imposed by the 
surroundings. In CSS2 it is assumed that all replaced elements -- and only
replaced elements -- come with intrinsic dimensions. 
</q>

CSS 2 assumes that replaced elements have intrinsic dimensions - <br> does
not.

The width and height is not determined by the surroundings - <br>'s are -
the width by the width of the remaining space in the line box and the
height that of the line box.

QED.

Since <br> is neither replaced nor non-replaced, but is merely (as per CSS
1) the same as an ordinary line break, except occurring earlier, it has no
effect on line box calculations (as common sense would suggest) and
therefore your example is wrong.

> BTW: Thanks for changing your wrapping settings. :-)
Thanks for the tip. 

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Received on Thursday, 13 January 2000 12:18:37 UTC