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

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

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Sat, 19 May 2012 10:27:19 +0200
Message-ID: <32FA765E75F5438CB31F9F0D8878B51D@FREMYD2>
To: "Chris Jones" <cjon@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "fantasai" <fantasai.lists@inkedblade.net>
Cc: <www-style@w3.org>, "Sylvain Galineau" <sylvaing@microsoft.com>, "Phil Cupp" <pcupp@microsoft.com>, "Markus Mielke" <mmielke@microsoft.com>
As a developer, my take would be to use the same naming convention for both 
axis. Being forced to memorize two keypairs with similar meaning in 
different contexts is simply a pain, however you would justify it. For 
instance, I'm regulary tricked when I have to use "middle" instead of 
"center" (I think this is in vertical-align).

Whichever direction the flow has, everybody can understand it has a "start" 
and an "end". However, I see "before" and "after" as confusing, because they 
don't specify to what they're relative to.

How can you be "before" or "after" something inside a single cell?




-----Message d'origine----- 
From: Chris Jones
Sent: Saturday, May 19, 2012 1:23 AM
To: Tab Atkins Jr. ; fantasai
Cc: www-style@w3.org ; Sylvain Galineau ; Phil Cupp ; Markus Mielke
Subject: RE: [css3-flexbox][css3-align] start/end vs. before/after

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.

Cheers,

-Chris

[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.

~TJ
Received on Saturday, 19 May 2012 08:27:42 GMT

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