W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [css3-flexbox] alignment test

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 8 Dec 2011 12:51:44 -0800
Message-ID: <CAAWBYDAYd+afdeusLH1KURkALmykS-EqAs12zYZcUP3W28f2Cw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Thu, Dec 8, 2011 at 12:15 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 12/07/2011 02:07 PM, Tab Atkins Jr. wrote:
>> On Wed, Dec 7, 2011 at 1:54 PM, fantasai<fantasai.lists@inkedblade.net>
>>  wrote:
>>> Firefox's flexbox behavior requires adding<spacer>  elements in order to
>>> have some things align to the left and others align to the right.
>>>
>>> I would like that not be the case.
>>
>> I believe it's cleaner and easier to understand if we wait for the
>> ability to create arbitrary pseudo-elements, which we expect to do
>> anyway to help out with Regions.  Then you can use pseudo-elements as
>> spacers, and have more control over alignment as well.
>
> I don't think creating elements or pseudo-elements is a good way of
> controlling spacing. That's what margins are for. We've come a long
> way since using spacer GIFs, please let's not go back to that.

We've got three options:

(1) use pseudo-elements here, because they play nicely with the layout
algorithm and easily expose *all* the knobs you might want
(2) use margins, which either means we have a relatively crappy
interaction with the rest of flexbox (all margins start from 0, have
the same flex, and are at a particular unchangeable location in the
flex hierarchy with elements and packing), or we complicate margins to
give them full access to flex abilities
(3) introduce another property that lets you insert "spacers", which
act like margins but have full access to the flex stuff.

I don't like (2).  I'm okay with (1), and we're going to end up
designing the pieces it needs anyway, so it becomes essentially free.
I'm also okay with (3), but I don't think it's needed quite yet.  I'd
design it if the WG thinks it's necessary, though.

(3) could look something like:

flex-space: [ <flex> <'flex-order'> ]#

It would create an anonymous box and set the appropriate flex
properties.  It would be considered before or after all elements when
sorting in document-order for flex-order.

~TJ
Received on Thursday, 8 December 2011 20:52:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT