Skip to content

[css-grid-2] Should items inside a subgrid establish a baseline for items in the outer grid? #7078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mattwoodrow opened this issue Feb 22, 2022 · 3 comments
Labels
css-grid-2 Subgrid; Current Work

Comments

@mattwoodrow
Copy link
Contributor

The test baseline-001.html is checking that they do, but the spec doesn't really cover how to handle sub grids wrt baseline.

@mattwoodrow mattwoodrow added css-grid-2 Subgrid; Current Work Needs Thought labels Feb 22, 2022
@fantasai
Copy link
Collaborator

This is covered in item (h):

The subgrid’s own grid items participate in the sizing of its in the subgridded dimension(s) and are aligned to it in those dimensions.

In this process, the sum of the subgrid’s margin, padding, and borders at each edge are applied as an extra layer of (potentially negative) margin to the items at those edges. [...]

Do you think this needs to be clarified? Is there some phrasing you would prefer that would make it clearer that baseline alignment is included in the "aligned" part of the first sentence?

@mattwoodrow
Copy link
Contributor Author

I think it'd be nice if section 11 (alignment and spacing) made reference to subgridded items as being explicitly included (as is done for the track sizing algorithm). I think this applies to both the align/justify properties, as well as the grid container's baseline itself.

Current it just references 'grid items', which are defined as being the in-flow children of the grid container, and having to cross-reference the subgrid section of the spec to override this seems confusing.

@tabatkins
Copy link
Member

Done!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-grid-2 Subgrid; Current Work
Projects
None yet
Development

No branches or pull requests

3 participants