W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2020

Re: [csswg-drafts] [css-sizing] `height: stretch` should just behave as `height: auto` (#1614)

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Mon, 20 Jul 2020 22:35:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-661391733-1595284522-sysbot+gh@w3.org>
As we were drafting text for this resolution, @tabatkins and I noticed that we had discussed what to do in cases where 'align-self: stretch' applies, but not so much where it doesn't.

Our [current draft](https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing) includes a paragraph defining these cases (where there's no 'align-self: stretch' behavior to hook into, such as the height of block boxes) to match the behavior of '100%', modified to apply to the margin box to effect the desired "fill container" behavior. (This specs the behavior suggested in the earlier https://github.com/w3c/csswg-drafts/issues/1614#issuecomment-316191422 )

In cases where even percentages can't resolve, it falls back to auto.

This new text still avoids the "blow up all the elements up to the nearest definite-height ancestor" behavior that was previously there, which inspired this issue in the first place; instead, it only references the nearest containing block, same as percentage resolution. And while it can still cause overflow in a container with a height:stretch element along with other children, this is no different than 'width: 100%'.

GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1614#issuecomment-661391733 using your GitHub account
Received on Monday, 20 July 2020 22:35:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:11 UTC