Re: align property

The idea is simple:

To give 'vertical-align' property its orthogonal counterpart - 
'horizontal-align'.

I've added it with the following principles:

Each layout manager has its own concept of horizontal/vertical-align.

In context of flexes alignment is a very last step of flex computations.
If after flex computations there is a free space then h/v-align governs were
this free space go.

For flow:default (default LM of <div> having other <div>s) and 
flow:vertical
- horizontal-align - used for each block-child  to align its h-position.
- vertical-align - if there is a free space in container then it tells where 
it will go.

And for flow:horizontal (blocks form single row)  meaning of
horizontal-align and vertical-align is orthogonal to flow:vertical :
- horizontal-align - if there is a free space in container in h-direction
  e.g. then if it is 'right' - free space go to the left.
- vertical-align - aligning blocks vertically inside the row.

Here is an illustration
http://www.terrainformatica.com/w3/flex-layout/images/sample-horizontal-bottom.png
of what happens if we define something like  this:

div
{
  flow:horizontal;
  vertical-align: bottom;
}

-- 
Andrew Fedoniouk

http://terrainformatica.com







-----Original Message----- 
From: Tab Atkins Jr.
Sent: Wednesday, January 26, 2011 8:43 PM
To: Brad Kemper
Cc: Bruno Podvezanec ; Mark Kenny ; www-style@w3.org
Subject: Re: align property

On Wed, Jan 26, 2011 at 8:35 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Jan 26, 2011, at 5:17 PM, Tab Atkins Jr. wrote:
>> On Wed, Jan 26, 2011 at 5:12 PM, Brad Kemper <brad.kemper@gmail.com> 
>> wrote:
>>> On Jan 26, 2011, at 3:54 PM, "Tab Atkins Jr." <jackalmage@gmail.com> 
>>> wrote:
>>>
>>>> not about a centered element also being floated.  That would be
>>>> trivial to resolve.  It's about floats elsewhere in the document that
>>>> can have effects elsewhere.
>>>
>>> True, but implementors have had to decide already what happens when a 
>>> <center>'ed item is affected by a float. I wouldn't mind improving the 
>>> interop of that by having something like 'center { display:block; 
>>> block-align: center top; }' in the UA style sheet, and then let's nail 
>>> down the less obvious effects of that in a block-align spec.
>>
>> You're welcome to figure out the behavior you want and spec it.  ^_^
>> I'm not interested in doing that right now.
>
> I thought we were talking about the value of the concept, not about who 
> was going to write the spec.

The two are linked.  An idea that everyone agrees is great but no one
will spec is an idea that'll never get implemented, which doesn't help
authors.

Flexbox solves the use-case simply, and I'm writing that.  If an even
simpler solution (or one that works in block layout) is desired, it'll
need an editor who can untangle the details of what needs to be done.
I don't think it's sufficiently worthwhile to work on.  If you do,
that's great.

~TJ

Received on Thursday, 27 January 2011 05:23:30 UTC