- From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
- Date: Wed, 08 Sep 2021 17:08:47 +0000
- To: public-css-archive@w3.org
Is `min-height:min-content` supposed to work (i.e. be treated as the content-height) for elements inside of a block? (I think it is, based on https://github.com/w3c/csswg-drafts/issues/3973#issuecomment-705663905 and surrounding comments.) If so, *and* if we resolve here that it doesn't prevent the element from being considered definite-height, then I worry that this could turn into "one weird trick" for getting block layout to have content-sizing combined with percent-resolution, and it would mean that browsers would have to start doing two-pass layouts inside of blocks in order to measure content and then resolve percentages. I'm thinking of examples like this (see the question in the CSS code-comment here): https://jsfiddle.net/dholbert/gjwrtv1h/ ```html <div class="test"> <div class="pct">p</div> <div class="tall">t</div> </div> ``` ```css .test { height: 100px; width: 100px; /* If this is honored, we'll end up with a used height of 150px, the height of our orange child. And then the question is, how tall should our percent-height cyan child be? Should it be content-height, or 100px, or 150px? */ min-height: min-content; border: 1px solid black; } .pct { height: 100%; width: 40px; background: cyan; display: inline-block; } .tall { height: 150px; width: 40px; background: orange; display: inline-block; } ``` -- GitHub Notification of comment by dholbert Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6457#issuecomment-915415947 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 8 September 2021 17:08:49 UTC