W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2016

Re: [csswg-drafts] [css-box-3][css-21] Positioning boxes with { float:left; width:0px; }

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 11 Oct 2016 23:32:59 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-253077465-1476228777-sysbot+gh@w3.org>
:( This is the problem with defining layout in terms of constraints, 
instead of as an algorithm - degenerate cases are often not 
well-defined.

While my reading of CSS2.2 is that this case is underdefined, I agree 
with Anton in how it *should* behave - if the linebox of preceding 
content is already forced to be *larger* than the available space, we 
should consider it as there being no space left on that line, so the 
float has to move down to the subsequent linebox.  (Note that this is 
[how Flexbox explicitly 
works](https://drafts.csswg.org/css-flexbox/#algo-line-break) - it 
collects things into a line until the *next* item would exceed the 
available space. So if an item takes up exactly the amount of space, 
we'll continue collecting zero-size items onto the line, but if an 
item takes up more than the amount of space, following zero-size items
 will be on the next line instead.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/576#issuecomment-253077465 
using your GitHub account
Received on Tuesday, 11 October 2016 23:33:05 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:04 UTC