W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-writing-modes] before/after terminology alternative?

From: Bert Bos <bert@w3.org>
Date: Thu, 3 May 2012 20:30:13 +0200
To: www-style@w3.org
Message-Id: <201205032030.14222.bert@w3.org>
On Tuesday 01 May 2012 19:59:43 fantasai wrote:
> We're pretty settled on start/end for the logical inline directions,
> but most people aren't that thrilled with before/after for the
> logical block directions. Someone suggested head/tail as an
> alternative. Would that be clearer? Do we want to switch?

I've been experimenting with head and tail, but recently I've been 
thinking that we should maybe avoid English words. We could talk about 
the A, B, C and D sides of a box instead. They would correspond to top, 
right, bottom and left sides in the default writing mode. (I got the 
idea from the A, B, C and D pillars used by car salesman.)

Some of our specifications need even more names. E.g., in margin 
collapsing, the A ("top") margin of the parent can collapse with 
whatever margin of the child happens to be adjacent. That is independent 
of that child's own writing mode, so it is not necessarily the child's A 

In the Box module, I first tried to avoid giving a name to that side of 
the child ("the margin on the side of the parent's head"), but the 
sentences became very long and so I started using "head-side" instead: 
"The head-side margin of the child collapses with the head margin of the 
parent." But the difference between head and head-side is too subtle.

The ABCD scheme, on the other hand, is extensible: We can talk about the 
A′, B′, C′ and D′ edges (pronounced "A prime") for the edges of a box as 
seen from the containing block. If the containing block has the default 
writing mode (horizontal-tb/ltr), then A′ is the top, B′ is the right, 

And it works for abstractions of width and height, too: A-C is the box's 
"logical height" and A′-C′ is the box's contribution to its parent's 
logical height.

E.g., a rewrite of the famous CSS2 § 10.6.7 ("'Auto' heights for block 
formatting context roots") could then contain a paragraph like this:

    If it has block-level children, the A-C dimension is the distance
    between the A′ margin-edge of the first block-level child box and
    the C′ margin-edge of the last block-level child box.

(Properly hyperlinked, of course. For comparison, the current text is: 
"If it has block-level children, the height is the distance between the 
top margin-edge of the topmost block-level child box and the bottom 
margin-edge of the bottommost block-level child box.")

It will need an illustration to make it palatable for normal readers, 
but I think it reduces the chance that an implementer misreads it.

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  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 May 2012 18:30:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:15 UTC