Re: [css3-flexbox] flex-direction values are confusing

On Fri, Mar 14, 2014 at 5:51 AM, Axel Dahmen <brille1@hotmail.com> wrote:
>> That's an interesting perspective.  The naming is taken from existing
>> usage, particularly tables, where rows are horizontal and columns are
>> vertical.
>
> This is quite contrary to my observation. When working with databases,
> spreadsheets and their corresponding frameworks, columns are always
> horizontally arranged (where, e.g., Column A is the leftmost column) and
> rows are vertically arranged (where, e.g., Row #0 is the uppermost row).
>
> Even the HTML table layout (colspan, rowspan) works according to my
> observation, and, as far as I can see, in contrast to the flex-direction.

Ah, I get it.  You're thinking that "flex-direction: row;" means that
the individual flex items should be thought of as "rows", and thus
they should be stacked vertically.

It's actually saying that the flexbox is arranging its items into
rows, so they stack horizontally.  Each flex *line* is a row (or
column, depending), and is in accord with the normal meaning of the
term.

Unfortunately, one can't ever really get away from the possibility
that people read something in an inverted fashion, especially when
we're trying to keep things short.  However, I don't think this
confusion is likely for most people, considering we have other uses of
row/column in CSS that are similar.  For example, Multicol arranges
the contents of an element into multiple columns, exactly the same way
a column flexbox does.


On Fri, Mar 14, 2014 at 7:31 AM, Axel Dahmen <brille1@hotmail.com> wrote:
> Yet, I'm not quite sure whether I'm the only person to be confused by the
> naming scheme.

I can't say whether or not you're the only, but you're definitely the
first person to make that mistake and speak up about it.

> Just in case others might be confused as well, wouldn't it be an advantage
> to rename the property values to something like "horizontal" and "vertical"?

No.  Like I said previously, the flex-direction values are
writing-mode dependent for a reason.  We thus can't use physical
directions.

Also, as I said before, Flexbox is already shipping in multiple
browsers, so name changes at this point are pretty much impossible.

~TJ

Received on Saturday, 15 March 2014 17:02:58 UTC