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:absolute #7124

Closed
mattwoodrow opened this issue Mar 9, 2022 · 3 comments
Closed
Labels

Comments

@mattwoodrow
Copy link
Contributor

This is somewhat similar to #7123, except for position:absolute instead of position:relative.

If a subgrid is position:absolute should all top/left/right/bottom values be ignored, and we should just stretch and position across the corresponding grid area in the parent? Should we (similar to one option for relative) try to respect these as much as possible while still forcing the width/height to the stretched value (if both left and right are set, what's the precedence between each of these and the stretched width?)?

What happens if a position:absolute subgrid doesn't cover any grid tracks and only covers the padding area of the parent (grid-row: auto / 1)? Should this be listed as an explicit reason that the specified value of subgrid isn't applied?

@mattwoodrow mattwoodrow added css-grid-2 Subgrid; Current Work Needs Thought labels Mar 9, 2022
fantasai added a commit that referenced this issue Mar 9, 2022
…atting context (as defined in css-display-3 currently). #7124
@tabatkins
Copy link
Member

This was technically already defined in CSS Display (abspos forces an IFC, which turns off subgrid), but we clarified it in Position, and added a reminder in Grid 2.

@mattwoodrow
Copy link
Contributor Author

Ah right, totally missed that, so thanks for adding the reminder.

There are a lot of WPTs testing that position:absolute works with subgrid, I'll fix this in WebKit and remove those tests (and add new ones to test that various IFC cases aren't subgrids).

@tabatkins
Copy link
Member

Ah, thanks, that would be wonderful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants