Re: [csswg-drafts] [css-grid-1] Empty grid tracks should contribute to scrollable overflow (#3638)

> Saying that you won't add it because the spec says a grid is only for layout abstraction and so and so.... Is self-defeating.

Heh, I'm not arguing circularly; I wrote the original text, so I'm stating my original intentions for the spec. ^_^

> And like I said, being able to use null cell tokens at the top but not at the bottom is counter-intuitive.

CSS is asymmetric with respect to left vs right and top vs bottom in many ways, all linked to the fact that the origin of the coordinate system is in the top-left corner (for English/etc).  Auto-placement only runs downward and rightward, for instance; scrollable area only extends downward and rightward.

"Being able to use null cell tokens at the top" is just because the scrollable area *always* extends up to the zero point, but only extends downward to the last scrollable content. I understand that's not a particularly satisfying answer, tho. ^_^  But the use-case you've presented is already doable in other, better ways: use padding on the grid container, and then center the grid with `align-content`; this will center your grid *without* affecting your use of `fr` units elsewhere in the grid.

If there are other use-cases where empty right/bottom tracks should be included in the scrollable area, that aren't already possible with existing properties (and, hopefully, in a non-hacky way), then it's a good reason to consider changing.

> When we get to the point of being able to style grid areas/gaps in CSS that may or may not have content in them, perhaps the areas with boxes from content OR boxes from styling should be considered in the scrollable area? This at least would be a CSS-only fix.

Boxes from pseudo-elements are boxes, so they'd definitely be counted there, yes. That's definitely not in question.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Tuesday, 12 February 2019 22:45:00 UTC