- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 2 Feb 2012 05:36:14 -0800
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Feb 2, 2012 at 3:10 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Wed, Feb 1, 2012 at 2:25 AM, fantasai <fantasai.lists@inkedblade.net> wrote: >> So far we have 'vertical-align' and 'text-align', which mainly have to do >> with >> text, but the new layout models are starting to introduce a lot more aligns. >> Flexbox has four different alignment properties. IIRC Grid introduces >> several >> more that do roughly the same thing but not quite. And there are use cases >> for >> alignment in general block layout -- there's been drafts for alignment >> properties >> in both dimensions there (that need homes, but that's a separate issue). >> >> Rather than having every layout system design and implement its own set of >> alignment properties, I'd like us to take a good look and see if we can boil >> these down to a single set of properties that we can all share. >> >> There are basically two concepts of what alignment applies to: >> a) the thing itself >> b) the thing's contents >> >> And then there are the two axes: main axis vs. cross axis; inline axis vs. >> block; >> rows vs. columns; etc. >> >> There's the problem of needing four appropriately generic and appropriately >> precise names, but I think we should be able to get away with four >> properties >> in CSS total. Values that don't apply in a particular layout mode can be >> defined >> to fall back to something sensible. I think that's better than having more >> and >> more properties that do roughly the same thing but take effect or not >> depending >> on the layout mode. > > I'm willing to try it out, but I'm not confident it'll be an > improvement. Let's work on it, though. Actually, I just thought of a substantial problem. Flexbox has 4 alignment properties: 1. aligns the contents in the main axis 2. aligns the contents in the cross axis 3. aligns the *lines* of content in the cross axis 4. on a child, aligns it within the flexbox's cross axis. While 1/2/4 map to your proposed alignment properties, 3 doesn't. Flexbox has two differents sets of "contents" that can be aligned separately. ~TJ
Received on Thursday, 2 February 2012 13:37:01 UTC