Skip to content

[css-grid] The definition of grid span #1994

Closed

Description

@xfq

The definition for grid span says:

How many grid tracks the grid item occupies. A grid item’s grid span is always definite, defaulting to 1 if it can’t be otherwise determined.

I don't understand the definition here. In the definition for grid track:

Grid track is a generic term for a grid column or grid row—in other words, it is the space between two adjacent grid lines.

If a grid item occupies two rows and three columns, what is the grid span of that grid item? Is it five (2 + 3)? Or is it six (2 * 3)?

Activity

  1. xfq commented on Nov 17, 2017

    @xfq
    MemberAuthor

    Or is it two in terms of row, and three in terms of column? (I mean, a grid item has two grid spans.)

    Or three in terms of row, and two in terms of column? (Because the grid item "spans" three columns in a row.)

  2. SelenIT commented on Nov 17, 2017

    @SelenIT
    Collaborator

    Or is it two in terms of row, and three in terms of column? (I mean, a grid item has two grid spans.)

    I believe, that's the correct understanding. The grid item has two grid spans, one for each axis. In the given example, it spans 3 grid tracks along the inline axis and 2 grid tracks along the block axis.

  3. tabatkins commented on Nov 17, 2017

    @tabatkins
    Member

    Yeah, a span of 2 in terms of row, and 3 in terms of columns. Virtually everything about grids is agnostic to the direction, and works in one axis at a time.

  4. xfq commented on Nov 18, 2017

    @xfq
    MemberAuthor

    Thanks.

    IMHO the definition text of grid span should be clearer, although I don't have a good proposal for the improved dfn for the moment.

  5. fantasai commented on Nov 27, 2017

    @fantasai
    Collaborator

    OK, we've updated clarified the definitions a bit. @xfq Let us know if it looks okay now?

  6. xfq commented on Nov 28, 2017

    @xfq
    MemberAuthor

    Thanks Tab & fantasai! It looks okay to me now. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions