- From: antonprowse via GitHub <sysbot+gh@w3.org>
- Date: Tue, 01 Nov 2016 21:01:01 +0000
- To: public-css-archive@w3.org
On the last telecon it was indicated that dbaron and TabAtkins felt that the spec should be clarified to make it more obvious that _a 0px width float that is next to a line box does count as shortening a line box_ - which is something that is already a direct consequence of what the spec says, since _any_ float with a margin area of positive height that's on the same horizontal level as a line box is regarded as shortening the line box. (The actual resolution [https://lists.w3.org/Archives/Public/www-style/2016Oct/0130.html] was that phrase which I have italicized, which is weird because it's not really a resolution; what's the action item? Is it to make a clarification? Or is it merely saying that the current spec is fine? Personally I don't think a clarification is needed. The spec is clear.) Or to put it another way, the answer to Fremy's question at the end of the post with which he opened the issue is that we should file bugs on browsers here, rather than change the rules. Still, since we're discussing these cases, I'll point out that I'm not sure that we should be so happy with the current rules in the spec. Consider the opposite case where a 0-width float precedes an overflowing inline (which I mentioned in my previous post), such as in the the last two examples in https://lists.w3.org/Archives/Public/www-style/2010Aug/0182.html as well as in the following example: <!DOCTYPE html> <div style="width:100px; height:100px; background:gray"> <div style="float:left; width:0; height:50px; background:green"></div> <span>supercalifragilisticexpialidocious</span> </div> The spec says that the inline should get pushed down to below the float (because the line box is shortened since the float is next the line box; note that the spec basically says that "next to" means you can draw a horizontal line to connect the float's margin area box to the line box, irrespective of whether they even touch - although I do suspect that that definition was arrived at in order to solve the 0-height float problem of Issue 185 [https://wiki.csswg.org/spec/css2.1#issue-185] rather than because of some deeper fundamental consideration). But Gecko (for example) doesn't push the word down, which I think is reasonable of it; and indeed I certainly dislike treating the line box as being shortened in the case where the right margin of a preceding float is negative and doesn't even intersect the content area of the element which generates the block container box in which the line box sits - yet that's what the spec demands. So perhaps we *should* consider changing the spec to approve Gecko's current behaviour in the latter situation. It would make for some hard editorial work though, since we do still want to achieve the motivation for the resolution, namely that /subsequent/ 0-width floats should be pushed down to below the overflowing line box; and if we're no longer able to achieve that in the way that the spec currently does it (by saying that such a float is next to the line box and hence shortens the line box) then, since it will be horrible to try to exclude such floats from being regarded as "next to the line box", we will instead have to introduce float placeholders and say that if a placeholder is encountered immediately after an inline which overflows then it is treated as sitting at the start of the next line box instead of at the end of the one containing the overflowing inline. Thoughts? -- GitHub Notification of comment by antonprowse Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/576#issuecomment-257695511 using your GitHub account
Received on Tuesday, 1 November 2016 21:01:07 UTC