W3C home > Mailing lists > Public > www-style@w3.org > August 1999

Re: CSS2 implementation

From: Rasmus Kaj <kaj@raditex.se>
Date: Wed, 11 Aug 1999 18:35:50 +0200
To: dbaron@fas.harvard.edu
Cc: ament@xs4all.nl, www-style@w3.org
Cc: Rasmus Kaj <kaj@raditex.se>
Message-Id: <19990811183550H.kaj@raditex.se>
>>>>> "LDB" == L David Baron <dbaron@fas.harvard.edu> writes:

 LDB> On Mon, 09 Aug 1999 17:59:43 +0200, Rasmus Kaj (kaj@raditex.se) wrote:
 a> where normal text has a margin-left: 2em
 a> and EM-text has a margin-left: 4em
 >> I assume:
 >> BODY { display: block; }
 >> EM { display: inline; }
 >> In this case, anonymous inline boxes should be created like this:
 >> <HTML><BODY><anon> TEXT IS NI</anon><EM>C</EM><anon>E
 >> </anon></BODY></HTML>

 LDB> That is what the spec says [1], but I don't think it makes much sense,
 LDB> since it doesn't explain why the anon and em inline boxes should have
 LDB> the same baseline.  As I've said before [2], I think the following:

 LDB> <HTML><BODY><anon> TEXT IS NI<EM>C</EM>E</anon></BODY></HTML>

 LDB> makes much more sense, since the vertial-align: baseline (the typical
 LDB> value) on the EM has a parent inline box to which it can align.
 LDB> Otherwise, if, for example, EM had a computed font-size of 300% and
 LDB> vertical-align of baseline, there would be nothing wrong with
 LDB> formatting it as:

In [3] it is stated that the vertical-align values "only have meaning
with respect to a parent inline-level element, or to a parent
block-level element, if that element generates anonymous inline
boxes". Hence, in your example vertical-align has a meaning with
respect to the parent block-level element (which maybe should be
clearified to mean the actual line box).

Hence the following wold be correct with EM { vertical-align: top; }

 LDB>             |
 LDB>             |__

While this would normally be the only correct rendering:

 LDB>             |--
 LDB>             |

 LDB> It would also give a much nicer way to describe the action of
 LDB> line-height on a block-level element.

Hmm ...  Maybe [4] could be made clearer? But onece the flow is broken 
into line boxes, i think that [5] is quite clear.  IOW, I don't think
this (how the anonymous boxes are generated) should be changed.

[1] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous
[2] http://lists.w3.org/Archives/Public/www-style/1999Jan/0027.html
[3] http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-vertical-align
[4] http://www.w3.org/TR/REC-CSS2/visuren.html#line-box
[5] http://www.w3.org/TR/REC-CSS2/visudet.html#line-height

Rasmus Kaj ---------------- rasmus@kaj.a.se - http://www.e.kth.se/~kaj/
 \         Deja Moo: The feeling that you've heard this bullshit before
  \--------------------------------------------- http://www.Raditex.se/
Received on Wednesday, 11 August 1999 12:36:09 UTC

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