Re: [css3-flexbox] Centering elements

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
window.)

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.

~TJ

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