Skip to content

[css-grid-2] Clarify interaction between subgrid and position:relative #7123

Closed

Description

@mattwoodrow

The current spec says that subgrid containers should always be stretched, but doesn't say anything about positioning. It does say that the grid itself should be aligned layout wise with the corresponding section of the parent grid.

If I apply position:relative and an offset to a subgrid, what should happen?

Should we offset the subgrid container (thus moving the rendering of the background/border etc) while leaving the grid aligned (such that the grid might be outside of the grid container)? Or should the positioning request be ignored, so that the subgrid container always covers the spanned grid tracks.

Activity

  1. tabatkins commented on Mar 9, 2022

    @tabatkins
    Member

    We've gone ahead and clarified this - relpos should just work "as normal", shifting the subgrid and its contents after layout has finished.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions