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

Re: [css3-flexbox] Bikeshed ALL the things

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 24 May 2012 07:51:36 -0700
Message-Id: <7AE31A07-5146-48CA-B268-C2A08A1D1720@gmail.com>
Cc: www-style list <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On May 23, 2012, at 10:31 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> The only remaining naming bikeshed is the start/end keywords in the
> 'align-*' properties
> <http://wiki.csswg.org/topics/start-end-before-after-align>.  We have
> two options:
> 
> 1. The current world, where both justify-* and align-* use "start" and "end".
> 2. More closely match the logical axises, and make align-* use
> "before" and "after".
> 
> The argument for (1) is that, first, using different keywords to
> accomplish basically the same thing in two properties is confusing,
> and second, these aren't the logical axises.  I *actually* call the
> directions "main-start/end" and "cross-start/end" in the Flexbox spec,
> and just drop the prefix for brevity in the property value.

Another argument for (1) is that it is hard to remember which of the start/end or before/after pairs are for inline/x axis and which are for block-progression/y axis. You can remove the space "before" or "after" the glyphs on a line, just as you can remove it from where the blocks "start" or "end". I don't imagine most authors would be good at remembering which is which, because it it not intuitive. 

I'd call my view argument (1.1). We should use the same word for both directions, perhaps with a prefix when more clarity is needed. But "start" and "end" are not opposites. The opposite of "start" is "finish", and the opposite of "end" is "begin" or "beginning". So, I would say, use 'align-items: beginning | end' ('begin' sounds too much like the verb, and 'ending' sounds too much like the end of a story), 'text-align: beginning | end', 'block-align: beginning | end', 'grid-column/row-align: beginning | end'. 

'before' and 'after' sound like they are outside of the thing you are aligning within, whether it is a line-box, block, grid block, or whatever.

Maybe for other uses, like absolute positioning, you could have the property names be 'top | right | bottom | left | block-beginning | inline-end | block-end |  inline-beginning'. And, for example, have 'linear-gradient(to inline-end, black, white)' (yeah, I went there).

> The argument for (2) is that, first, using the same keyword in different axises is confusing,

The four keywords are confusing to begin with (or to start with), beforehand.

> and second, while they're not an exact match for the logical keywords in Flexbox, they *are* in Grid and probably Block, as both of those always lay out relative to the current writing mode.

Grid already has the axis in the property name. I'm not sure what you mean by "probably Block". Would that be something like 'block-align'?
Received on Thursday, 24 May 2012 14:52:13 GMT

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