Re: +-AFs-css3-flexbox+-AF0- flex-direction values are confusing

On 03/12/2014 07:50 AM, Axel Dahmen wrote:
> The term "row" (or "rows") is usually associated with vertical layout
> while "column" (or "columns") is mainly associated with horizontal
> layout. But for flex-direction, both terms are used quite to the contrary.

The idea behind "flex-direction: row" is "lay out the items in a
(single) row." (Or multiple rows, if "flex-wrap:wrap" is specified.)

Another way to think about it: most of flexbox is about what happens
within a single Flex Line. The "flex-direction" property tells you what
a Flex Line actually is. (a row or a column).

> ... or even rename the value "row" with "horizontal" and "column" with
> "vertical".

The CSSWG actually intentionally chose *logical* direction names, whose
meanings are interpreted with respect to the current writing-mode.

(This means the default orientation of a flexbox matches the default
orientation of the surrounding text -- if you're in bottom-to-top
writing-mode, then "flex-direction: row" should give you an orientation
that matches. This can ends up producing vertical rows and horizontal
columns, which is a bit confusing, but which makes some sense from the
perspective of that writing-mode.)

~Daniel

Received on Wednesday, 12 March 2014 16:24:21 UTC