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

RE: [css3-flexbox] Typos in updated flexbox spec

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Thu, 8 Sep 2011 03:03:54 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E53985692841212348D@TK5EX14MBXC213.redmond.corp.microsoft.com>
This is exactly the kind of argument I'd expect to have 'before' renaming keywords. I prefer that to 'start' renaming...

So we have a few considerations to balance:

1) consistency with line direction and block direction keywords:
	if main axis is similar to line direction (start-end),
	then cross axis is similar to block direction (before-after)
2) consistency with text-align and vertical-align
	text-align values apply to 'flex-pack' (start|end|center|justify)
	vertical-align values apply to 'flex-align'(before|after|middle|baseline)
3) consistency of 'flex-pack' and 'flex-line-pack'
	similar name calls for similar values
4) consistency with grid 
	which has complete functional symmetry for rows and columns, 
	same syntax, same algorithms, 
	no benefit from using different keywords for rows/columns
5) will a shortcut property for both direction ever make sense?
	Then something like "flex-layout:row start middle" is more readable 
	than "flex-layout:row start center"

Last time we have discussed this (when 2009 spec was the current spec and neither 'grid-row-align' nor flex-line-pack' existed), it were only (1) and (2) to think about, and "before|after|middle" seemed the most logical choice. So obvious in fact that I used in IE10 implementation (expecting that the spec will get fixed any day, which didn't happen, and now it is a hassle for people writing cross-browser stylesheets).

Even with all additional issues, if one of the values is 'baseline', the property is already special enough, then it makes sense to include values that go with 'baseline', such as 'middle'.

Including Grid in the mix makes it less obvious. Grid doesn't have a "main axis" though... What if Grid had 'baseline' as one of align values? Would it also make sense to have it on both row and column? Would it work if set on both and using mixed-writing-direction content? If it would, it would be an argument for start/end everywhere.

The argument for 'flex-pack' and 'flex-line-pack' having different values I am not buying. Same applies to 'text-align' and 'vertical-align', and I never thought that they should accept same values. They are totally different. Perhaps using plural 'flex-lines-pack' would further clarify the difference...

Either way, I really want the syntax to get stable. I don't care what it is but I want to know that it won't change again. ***please*** get WG resolutions for syntax changes or this will never get to CR.

Alex

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Wednesday, September 07, 2011 5:07 PM
To: Alex Mogilevsky
Cc: Tony Chang; Daniel Holbert; www-style@w3.org
Subject: Re: [css3-flexbox] Typos in updated flexbox spec

On Wed, Sep 7, 2011 at 3:59 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ‘flex-align’ values were before|after|middle|stretch|baseline, which 
> apparently changed recently to start|end|center|baseline|stretch.
>
> I don’t see any discussion or resolution to rename values, and I 
> though we agreed earlier that it makes sense to match vertical-align 
> values. What happened here?

I tried to make all the properties consistent.  I think it's better to settle on either start/end/center or before/after/middle for everything, than to try and decide whether a particular property is "more like 'text-align'" or "more like 'vertical-align'".  Between the two sets of terms, I prefer using start/end/center in a generic manner.  They seem to flow better - "the start edge" sounds betters than "the before edge".

For example, flex-line-pack is basically identical to flex-pack in functionality (both align multiple items in an axis), but it's in the same axis as flex-align.  Do you use before/after because it's in the same axis as flex-align (thus making it confusing that the values are different from flex-pack), or do you use start/end because it has the same functionality as flex-pack (thus making it confusing that you have to say "flex-align:before; flex-line-pack:start;" to put things at the start edge).

Plus, the Grid spec uses start/end/center for both of its alignment properties.  Consistency is good.  (I agree with its usage, too - it would be horrible if one property used start/end/center and the other used before/after/middle.)

(If we wanted to be really exact, the values would be main-start, cross-end, etc., like I refer to them in the spec.  But that seemed
silly.)

~TJ

Received on Thursday, 8 September 2011 03:04:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:44 GMT