Re: Flexbox children with display flex






On 11/11/14, 2:23 PM, "Alan Stearns" <stearns@adobe.com> wrote:

>On 11/10/14, 11:10 PM, "Karen Menezes" <karen.menezes@gmail.com> wrote:
>
>>I have a question regarding (immediate) children of a parent with
>>display: flex, i.e. a flex container. Can a child or flex-item also have
>>a display of flex associated with it, thereby becoming a flex-container
>>itself? 
>>I was unable to find the answer here: http://www.w3.org/TR/css3-flexbox/

>>What is the spec's take on this?
>
>The abstract mentions that nesting flex boxes is an expected use:
>
>"Nesting of these boxes (horizontal inside vertical, or vertical inside
>horizontal) can be used to build layouts in two dimensions.”

Yes; also in section 4 Flex Items:

 # A flex item establishes a new formatting context for its contents. 
 # The type of this formatting context is determined by its display value, 
as usual. 

i.e. a flex item can have display:flex etc.

(Incidentally not sure if the abstract is normative…)

Received on Tuesday, 11 November 2014 21:52:00 UTC