-
Notifications
You must be signed in to change notification settings - Fork 707
[css-overflow-3][css-sizing-3] Define contribution of scrollbars to min-content/max-content sizes #3348
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
Comments
I feel like this should depend on https://drafts.csswg.org/css-overflow-4/#scollbar-gutter-property : when there is a scrollbar gutter as defined there, then it should affect intrinsic sizing, and if not, not (and for level 3, since we don't have that property yet, it would boil down to what the initial value of that property does in various cases). |
Is this the right way to ask the question though? Spec quote from the part that defines Intrinsic contributions:
That's about the content box, so to me, it's pretty clear that they should not include the scrollbar size, as that's not in the content area. However, when you calculate the outer size, starting from the content size, you should add the padding, scrollbar gutter, border and margin, and if you skip adding the scrollbar gutter, you get weird results. |
So I think that what we need is a clarification in css-sizing-3 and/or css-box-4 (probably the later) that the border edge goes around not just the content+padding+border area, but also includes the gutter area, that the margin/outer edge builds from there, and that when you're computing the sizes of these things, you have to take account for the size of the gutter. |
css-overflow has this:
which is probably a bit too casual in its phrasing. If we're doing available width sizing, then yes, we start with the dimension of the containing block, and substract the m/b/p and the size of the gutter, but otherwise, when we're sizing from the content box outwards, then the size of the scrollbar gutter needs to be added to the the inner size, along with m/b/p, to get to the outer size. |
"When the box is sized to fit its contents" is that equivalent to all forms of intrinsic sizing, or only |
OK, fixed. Resulting text is in https://drafts.csswg.org/css-overflow-3/#scrollbar-layout |
@cbiesinger noticed that we don't seem to spec whether/how scrollbars contribute to the intrinsic size contributions. Firefox, for example, includes the scrollbar width when 'scroll' but not 'auto'; Blink includes the scrollbar whenever present. See testcase.
The text was updated successfully, but these errors were encountered: