Skip to content

[css-align] axis naming inconsistency - can we settle on the canonical name for an axis with the others being descriptive in context? #1372

Closed
@rachelandrew

Description

@rachelandrew

I've been reviewing the alignment spec, and in various places there is inconsistency with naming of the two axises. There has been confusion amongst authors around this too, see: #1299

  • The main axis can also be referred to as inline or row
  • The cross axis can also be referred to as block or column

Through this spec and the Grid and Flex specs, these are referenced in different ways. I'd like to suggest that we decide on the canonical name for these things then clarify in parentheses if there is a useful name for it, within the context it is being used.

Also, that we ensure there is a clear definition somewhere of naming. As requested in the linked issue above. That might be in the individual specs - however for something like column and row this is already used in this spec to refer to table and grid axises, which might be an argument to define terminology here.

For example in the alignment specification:

  1. Overview of alignment properties https://drafts.csswg.org/css-align/#overview

"which dimension they apply to (main/inline vs. cross/block), and"

  1. The table below the above description also only refers to main/inline and cross/block (no column and row)

  2. The first mention of Column and Row as names for the axises is in 5.1.4 https://drafts.csswg.org/css-align/#distribution-grid

align-content Axis The block (column) axis, aligning the grid rows.
justify-content Axis The inline (row) axis, aligning the grid columns.

  1. 5.2. Baseline Content-Alignment https://drafts.csswg.org/css-align/#baseline-align-content
    Section mentions rows and columns but refers to the axises only as main and inline.

  2. 8.2 Baseline Alignment Terminology https://drafts.csswg.org/css-align/#baseline-terms

In this section the column or row naming is used as the main axis name. With inline or block in parentheses. Flexbox only uses the main naming.

"table cells in the same row, along the table’s row (inline) axis, established by the row box
table cells in the same column, along the table’s column (block) axis, established by the column box
grid items in the same row, along the grid’s row (inline) axis, established by the grid container
grid items in the same column, along the grid’s colum (block) axis, established by the grid container
flex items in the same flex line, along the flex container’s main axis, established by the flex container"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions