Re: [csswg-drafts] [css-grid-2] Subgrid and scrollbars (#6350)

> This doesn't seem specific of scrollbars, it seems Firefox is not taking borders and margins into account either? Just the padding. [Testcase](http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cstyle%3E%0A%23grid%20%7B%0A%20%20display%3A%20grid%3B%0A%20%20width%3A%20max-content%3B%0A%20%20border%3A%20solid%3B%0A%7D%0A%23subgrid%20%7B%0A%20%20display%3A%20grid%3B%0A%20%20grid-template-columns%3A%20subgrid%3B%0A%7D%0A%23item%20%7B%0A%20%20height%3A%20100px%3B%0A%20%20width%3A%20100px%3B%0A%20%20border%3A%205px%20solid%20lime%3B%0A%20%20box-sizing-border-box%3B%0A%7D%0A%3C%2Fstyle%3E%0ABAD%3F%0A%3Cdiv%20id%3Dgrid%3E%0A%20%20%3Cdiv%20id%3Dsubgrid%20style%3D%22overflow%3A%20scroll%3B%22%3E%0A%20%20%20%20%3Cdiv%20id%3Ditem%3E%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3Cdiv%20id%3Dgrid%3E%0A%20%20%3Cdiv%20id%3Dsubgrid%20style%3D%22border%3A%205px%20solid%20orange%3B%20overflow%3A%20hidden%3B%22%3E%0A%20%20%20%20%3Cdiv%20id%3Ditem%3E%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3Cdiv%20id%3Dgrid%3E%0A%20%20%3Cdiv%20id%3Dsubgrid%20style%3D%22border%3A%2015px%20solid%20orange%3B%20overflow%3A%20hidden%3B%22%3E%0A%20%20%20%20%3Cdiv%20id%3Ditem%3E%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3Cdiv%20id%3Dgrid%3E%0A%20%20%3Cdiv%20id%3Dsubgrid%20style%3D%22margin%3A%2015px%3B%20overflow%3A%20hidden%3B%22%3E%0A%20%20%20%20%3Cdiv%20id%3Ditem%3E%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3Cbr%3EGOOD%3F%0A%3Cdiv%20id%3Dgrid%3E%0A%20%20%3Cdiv%20id%3Dsubgrid%20style%3D%22padding%3A%2015px%3B%20overflow%3A%20hidden%3B%22%3E%0A%20%20%20%20%3Cdiv%20id%3Ditem%3E%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E)

Yes, this is a bug, and should already be fixed in Firefox 90 ([Bug 1709491](https://bugzilla.mozilla.org/show_bug.cgi?id=1709491)). And grid area and grid item's margin is going to be included in the scrollable overflow area in [Bug 1527539](https://bugzilla.mozilla.org/show_bug.cgi?id=1527539).

Coincidentally, I'm also investigating Firefox's behavior on subgrid and scrollbars for a while in [Bug 1711803](https://bugzilla.mozilla.org/show_bug.cgi?id=1711803). My thought was that the subgrid has only explicit grid area, and the scrollbar size shouldn't affect the subgrid area whether it is overlay or classic. See [bug 1711803 comment 2](https://bugzilla.mozilla.org/show_bug.cgi?id=1711803#c2). However, I don't feel strong about it. If the spec is clear that we should take the classic scrollbar's size it into account, i.e., we like Firefox's current behavior. I'm totally OK with it.

cc @MatsPalmgren @dholbert 




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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 4 June 2021 18:36:32 UTC