Skip to content

[css-align][css-grid] Baseline shared alignment context for items spanning more than one row/column #1037

@javifernandez

Description

@javifernandez

The spec states the following to define when boxes may share an alignment context:

https://drafts.csswg.org/css-align-3/#baseline-terms

Boxes share an alignment context along a particular axis when they are:

  • 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

I had initially understood that items spanning several tracks (eg, grid-row: 1 / 3) would still share an alignment context with items placed at a single track (eg, grid-row: 1 / 2), since they indeed share the first row.

My understanding also suggested that such item spanning several tracks didn't share an alignment context with items located at second row (eg, grid-row: 2 / 3), since I was considering only the first track for items spanning multiple tracks.

First of all, are my assumptions correct ? Either they are or not I think we should have something in the spec to address this issue and explain how we should treat spanning grid items.

If my assumptions are correct, then I have some implementation issues because the scenario described above may result on a baseline offset which could cause that the items located at a single track to be placed outside their grid area.

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