W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Flexbox children with display flex

From: Karen Menezes <karen.menezes@gmail.com>
Date: Tue, 11 Nov 2014 12:40:09 +0530
Message-ID: <CAFQ+CReEmeXThUQvtqmqHk8t6znheUi0uCxENk61zC-8wKH1VA@mail.gmail.com>
To: "www-style@w3.org" <www-style@w3.org>
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?

I made a basic demo here: http://jsfiddle.net/qeaayghn/
The .section-top div is a flex-container and each div with the box class is
a flex item. I've made the last box a flex-container again, so I can center
the image inside its child with class box-child.

Of course, the image could be centered in many other ways, but I'd like to
know whether it violates the spec, in the first place.

Regards,
Karen
Received on Tuesday, 11 November 2014 07:10:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC