- From: Bert Bos <bert@w3.org>
- Date: Sun, 26 Apr 2009 18:42:41 +0200
- To: www-style@w3.org
Tab Atkins Jr. wrote: > On Fri, Apr 24, 2009 at 7:53 AM, Alexis Deveria <adeveria@gmail.com> wrote: >> Thanks! Yeah, the multiple element support was a little tricky to deal >> with. Since I didn't want to modify the DOM structure, the script >> doesn't create a parent container for multiple elements. Thus, the >> slot isn't stretched when it actually should be. I'm sure the current >> behavior can be improved upon though, so thanks for mentioning that. > > Ah, k. I brought it up, actually, because my reading of the spec > suggests that the stretching should *not* occur. An example or two > implies it in the suggested rendering, but it doesn't seem to be > expressed anywhere in the actual rules. I believe they should act in > every way like ordinary elements placed into an invisible container. > > Bert would probably know a bit better about it than I, though. ^_^ The intention is that each non-empty slot contains one anonymous block element that in turn contains all the elements for that slot. All those elements contribute to the calculation of the height of the anonymous block, in a way similar to (hopefully exactly the same as) the height calculation for "block formatting contexts" in CSS2. That anonymous block is then placed in the slot at a position determined by the 'vertical-align' property of the slot: top, middle, bottom or baseline. There is no notion of elements being stretched anymore in the latest draft. The idea of stretching elements was inspired by a possible extension to 'vertical-align': elements could be "distributed" vertically over the available height, similar to how words are distributed horizontally over a justified line. However, this theoretical possiblility seems of little practical value, and would moreover interact badly with collapsing margins. To vertically distribute elements, it seems better to use a template with alternating rows of content and rows of whitespace ('.'). Bert -- 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 Sunday, 26 April 2009 16:43:17 UTC