- From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
- Date: Sat, 30 Apr 2011 00:03:11 -0700
- To: "L. David Baron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "Alex Mogilevsky" <alexmog@microsoft.com>, "Brad Kemper" <brad.kemper@gmail.com>, "www-style list" <www-style@w3.org>
>-----Original Message----- >From: L. David Baron >Sent: Friday, April 29, 2011 8:41 PM >To: Tab Atkins Jr. >Cc: Andrew Fedoniouk ; Alex Mogilevsky ; Brad Kemper ; www-style list >Subject: Re: box-align > >On Friday 2011-04-29 12:55 -0700, Tab Atkins Jr. wrote: >> The re-use of 'vertical-align' to do content alignment in table cells >> was inarguably a mistake. > >It was? Having different properties that do similar things in >different contexts can be confusing -- authors might have trouble >remembering which one is which. > Exactly. > >Also, for the record, the box-align proposal we discussed a few >years back was about horizontal alignment only. The proposal in >this thread seems substantially different, since it puts the >alignment property on the parent instead of the children, and has >alignment on both axes. This adds the capability to align >vertically, but removes the capability of aligning different child >blocks differently, and perhaps confuses the model a good bit as >well. Not quite so. Consider XUL's <vbox> alike layout. vertical-align for it means the following: Take free space left after all vertical flex computations and if the space is greater than zero move *all* elements vertically as a whole. horizontal-align in it means the following: For each element compute its horizontal dimensions/flexes and if there is free space left move *this* element accordingly. For <hbox> algorithm is the same (orthogonal symmetry). horizontal-align applied to all elements as a whole. vertical-align is applied individually. But again all this happens *after* flex computations and only if there is free space left in corresponding direction. So flex values of margins/paddings/width/height on the element may override alignments set by the container. So we can define individual alignment of elements. Very flexible to be short. Plus vertical/horizontal-align shall define alignment in overflow:hidden containers. -- Andrew Fedoniouk http://terrainformatica.com
Received on Saturday, 30 April 2011 07:03:41 UTC