W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Re: [css3-flexbox] flexbox questions

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 1 Jun 2010 20:43:25 -0700
Message-ID: <A0D2ACB0293A417B99E6671E22F210D9@terra3>
To: "David Hyatt" <hyatt@apple.com>, "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>


--------------------------------------------------
From: "David Hyatt" <hyatt@apple.com>
Sent: Tuesday, June 01, 2010 12:51 PM
To: "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>
Subject: Re: [css3-flexbox] flexbox questions

>
> We should just kill box-pack / box-align in favor of flex units, and then 
> there won't be any ambiguity regarding placement. :)
>

While this is make sense to do in general but there
are cases when something like content-align makes
real sense. With or without flex units.

Consider this case:
<div overflow:hidden width:1000px>
   <div width:2000px />
</div>

If outer div will have content-align:right then
inner div will stuck on right side of the outer div.
In the same way as if direction:rtl defined for that element.

<div overflow:hidden width:1000px direction:rtl>
   <div width:2000px />
</div>

With flex units content-align also make sense if
sum of flexes is less than 1fx or there are max constraints
in place.

Ideally it would be just perfect if all aspects of RTL/LTR/TTB
were declared explicitly in CSS from the very beginning as
separate properties. So would be able to define the following in
default style sheets:

*[dir=ltr]
{
   [writing-]direction: ltr;
   [block-]flow: vertical;
   content-align: top left;
}
*[dir=rtl]
{
   [writing-]direction: rtl;
   [block-]flow: vertical;
   content-align: top right;
}
*[dir=ttb]
{
   [writing-]direction: ttb;
   [block-]flow: horizontal;
   content-align: top left;
}
*[dir=btt]
{
   [writing-]direction: btt;
   [block-]flow: horizontal;
   content-align: top right;
}

-- 
Andrew Fedoniouk

http://terrainformatica.com

 
Received on Wednesday, 2 June 2010 03:43:54 GMT

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