-
Notifications
You must be signed in to change notification settings - Fork 671
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-overflow-3] Does block-level box's margins contribute to scrollable overflow? #8660
Comments
The spec is fine wrt. to this IMO. The margins aren't directly added to the scrollable overflow - rather the margins are affecting the inflow-bounds: "Additional padding added to the end-side of the scrollable overflow rectangle as necessary to enable a scroll position that satisfies the requirements of place-content: end alignment." The test there isn't testing at we add the margins directly to the scrollable overflow. There is an open question if we need the to add margins (directly) at all now, from feedback we've received about the "additional padding" change it isn't, and this matches developer expectations. Currently Gecko/WebKit aren't actually following the spec here adding margins in all cases for example: (Gecko is doing this in a somewhat broken manner for block containers however, e.g. when margin-collapsing is present - https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11465 ) Instead Gecko/WebKit are only doing this if it is a flex/grid container is a "scrollable container" as well. Thoughts? Ian |
@dshin-moz - https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11469 Gecko is only doing the weird treatment in one axis as well. |
I don't think it's well-defined what it means to The axis we're discussing here is the inline axis of a block container, which would correspond to the (There's some nuance for scroll-container-specific behavior in css-align-3 section 5.3, but that still ties back to "the expected alignment of the alignment subject and alignment container", which in this case is "no effect", per the "does not apply" quote above) So AFAICT So we might need to rewrite what this
Haven't looked closely at this yet, but if it's relevant, we haven't landed our changes for #129 yet (https://bugzilla.mozilla.org/show_bug.cgi?id=1768921 ). |
Yeah I'd probably agree with that. I previously advocated for writing down the "inflow-bounds" for each layout method - but I think others said the
The main thing to keep in mind is that this isn't directly adding margins, just the padding at the end of the inflow-bounds. @dholbert - What do you think of removing the margin-clause entirely? |
The spec indicates that end-side padding should be added to scrollable overflow (As per issue #129), but is explicitly undefined on the matter of adding margin areas of any box other than flex or grid items. On the other hand, scrollable-overflow-padding WPT test explicitly includes the margins of a block box to the test.
Should the spec be updated to match this behaviour?
The text was updated successfully, but these errors were encountered: