- From: Manuel Rego Casasnovas via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Nov 2017 11:24:44 +0000
- To: public-css-archive@w3.org
> Percentages resolve to zero when specified against an indefinite size (such as the logical width of a float or the ''height/auto'' logical height of a block-level grid container). I think the `height: auto` part is clear and it's fine. However I'm not convinced about the width part, basically I'm not sure if there's any case where the `width` is indefinite. Let's go to the [definite and indefinite definitions in `css-sizing`](https://drafts.csswg.org/css-sizing-3/#definite): <blockquote> <dl> <dt>definite size<dt> <dd><p>A size that can be determined without performing layout; that is, a <length>, a measure of text (without consideration of line-wrapping), a size of the initial containing block, or a <percentage> or other formula (such the “stretch-fit” sizing of non-replaced blocks [CSS2]) that is resolved solely against definite sizes.</p> <p>Additionally, the size of the containing block of an absolutely positioned element is always definite with respect to that element.</p></dd> <dt>indefinite size</dt> <dd><p>A size that is not definite. Indefinite available space is essentially infinite.</p></dd> </dl> </blockquote> The edit says as an example of indefinite width "*the logical widh of a float*". But it seems we don't need to perform any layout to calculate the width a float as defined [in CSS2](https://www.w3.org/TR/CSS22/visudet.html#float-width): > Then the shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width). For checking the preferred minimum width and preferred width we don't need to perform a layout, it's somehow what's in the **definite size** definition as "*a measure of text*". In any case, I'd love to get feedback from other implementors as I might be biased due to how Blink/WebKit rendering engine works. -- GitHub Notification of comment by mrego Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/509#issuecomment-347831796 using your GitHub account
Received on Wednesday, 29 November 2017 11:25:06 UTC