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

Re: [css3-flexbox] Centering elements

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 15 Sep 2011 15:12:55 -0700
Message-ID: <CAAWBYDA7q=7iJ=3E8kwQDK_KPrFcRBqvLVgZ_u-1Jo_c7p2-_Q@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: www-style list <www-style@w3.org>
On Wed, Sep 14, 2011 at 3:59 PM, Ojan Vafai <ojan@chromium.org> wrote:
> This is more general than flexbox. Lets give control over how to handle
> overflow in general, e.g., something like position-contain
> fromĀ http://www.xanthir.com/blog/b48H0?

Hmm, that's interesting.  So you mean letting flexbox centering be
true centering, and then in the future give the ability to combine it
with containment, like:

foo {
  display: flexbox;
  flex-align: center;
  contain-left: window;
  contain-top: window;

Dunno how well this would work.  You want to keep the centered items
from going outside the scrollable areas, but you don't want to push
them further than the edge of the flexbox.  (If I position the flexbox
1000px to the left, the items shouldn't still be contained within the

We could just say "screw it" for now and assume we'll be smart enough
in the future to figure it out, or else just add another keyword for
safe centering later.  That sounds like enough flexibility for me to
be happy with.

Received on Thursday, 15 September 2011 22:13:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:04 UTC