Skip to content
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

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

Closed
mattwoodrow opened this issue Mar 9, 2022 · 1 comment
Closed

Comments

@mattwoodrow
Copy link
Contributor

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.

@tabatkins
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants