W3C home > Mailing lists > Public > www-style@w3.org > May 2012

RE: [css3-flexbox][css3-align] start/end vs. before/after

From: Chris Jones <cjon@microsoft.com>
Date: Fri, 18 May 2012 23:23:19 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>, Sylvain Galineau <sylvaing@microsoft.com>, Phil Cupp <pcupp@microsoft.com>, Markus Mielke <mmielke@microsoft.com>
Message-ID: <314AEA692CE6754A854276304D0CD6C01BA1F68D@TK5EX14MBXC261.redmond.corp.microsoft.com>
As stated, the issue [1] implies an update of some of the Grid layout module's alignment property. However, we disagree that column alignment and row alignment in Grid (or inline and stacking alignment in Flexbox) are different enough from each other to warrant different names for property values. 

We recognize that the proposed property names have their roots in the concepts of content alignment and justification, and that these concepts have different histories, and in some cases, different use cases. It doesn't make sense to talk about justifying content on a baseline, for example. That said, Grid item alignment isn't analogous to content alignment - we don't support aligning content to a row's baseline, nor do I think we intend to. In fact, the range of use cases for row alignment of a Grid item in a Grid cell is exactly the same as for column alignment in a Grid cell. (Keep in mind that a Grid cell itself doesn’t have inline content - only the Grid item has inline content, and the Grid item, as a separate element, can be subject to the kind of content justification/alignment properties in fantasai's proposal.) 

That being the case, there's no need to confuse the end user with needless differences in syntax. For example, the unified syntax in the attached example is, we think, simpler and easier to understand than the split syntax. Three basic value names (start, end, center) are easier to remember than five (start, end, center, before, after), as well as figuring out which set of names attaches to which property.

Similar arguments are applicable to Flexbox - at the root, these are positioning controls for items. Like Grid, inline content in Flexbox is actually wrapped with an anonymous box, and not floating in the Flexbox element itself, subject to alignment properties. That being the case, let's keep content alignment properties separate from the item alignment properties in Grid and Flexbox.



[1] http://wiki.csswg.org/topics/start-end-before-after-align

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Wednesday, May 16, 2012 4:13 PM
To: fantasai
Cc: www-style@w3.org
Subject: Re: [css3-flexbox][css3-align] start/end vs. before/after

On Wed, May 16, 2012 at 3:47 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> The Box Alignment proposal uses the flow-relative terms strictly, with 
> the -justify properties using start/end and the -align properties 
> using before/after.
> Aligning the two specs would mean Flexbox needs to switch flex-align, 
> flex-item-align, and flex-line-pack to before/after. Are there any 
> reasons not to do this?

No, it would be fine.  I use the terms cross-start/end consistently throughout the spec itself; it would be a little weird to say that "justify-outside:before" made it align its cross-start side against the cross-start side of the line, but whatever.


CSS Alignment example.png
(image/png attachment: CSS_Alignment_example.png)

Received on Friday, 18 May 2012 23:23:56 UTC

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