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

@fantasai 
>Padding, gaps, and boxes are also abstractions.

_All_ CSS concepts are abstractions, but that doesn't imply they are created equal. Margin-, padding-, border- and content-boxes are included in the [CSS box model](https://www.w3.org/TR/CSS22/box.html) and the overflow falls out from that. Tracks, lines, gaps and other concepts are not included. So, if you want to include the extent of the grid in the scrollable overflow you are changing the CSS box model. That's fine of course, but it's not something that should be taken lightly. It could quite easily open up a can of worms both in specs and implementations. Before we do changes of this fundamental nature we should have a _very_ strong motivating use case.

So, the use case at hand is that we want to distance the block-end border edge of the last grid item to the end of the container by at least `2rem`. Fortunately, it turns out that CSS already has a [feature](https://www.w3.org/TR/CSS22/box.html#margin-properties) for exactly this use case. (Concretely for the given testcase: remove the last track size and add `#text { margin-block-end: 2rem; }` - problem solved.).  I can think of numerous other ways that would also solve this use case using existing CSS features only.  Conclusion: the motivating use case is weak.

(FYI, I filed #3653 to sort out the exact definition of how child margins should contribute to the scrollable overflow. I intend to change Gecko so that is compatible with Chrome in Grid and Flexbox layout [here](https://bugzilla.mozilla.org/show_bug.cgi?id=1527539), assuming the CSSWG agrees on that.)


-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3638#issuecomment-464405715 using your GitHub account

Received on Sunday, 17 February 2019 01:26:31 UTC