This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15881 - An attempt to define float position when a source-preceding box has a negative vertical margin
Summary: An attempt to define float position when a source-preceding box has a negativ...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-04 13:20 UTC by Anton P
Modified: 2012-12-04 00:51 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-02-04 13:20:27 UTC
(It may be that this bug should be addressed in CSS3 rather than CSS21 errata.)

The resolution of Issue 229 (see below) attempted to solve a problem whereby UAs don't obey the the rules for float positioning in certain cases where ource-preceding box has a negative vertical margin.

It did this by appending the following sentence to 9.5.1 after the nine rules
for float positioning:

  # But in CSS 2.1, if, within the block formatting context,
  # there is an in-flow negative vertical margin such that
  # the float's position is above the position it would be at
  # were all such negative margins set to zero, the position
  # of the float is undefined.

The fact that this new sentence fails to make undefined certain problematic cases is Bug 15389.

However, even if the sentence were bug-free, the approach is very heavy-handed since it makes undefined cases where the negative margin makes no difference 
whatsoever to the rules in 9.5.1 such as:

<body style="width:100px">
	<div style="background:orange; width:120px; height:20px; 
margin-bottom:-10px"></div>
	<div style="background:yellow">
		<span>text text text text text text text text text text text text 
text</span>
	</div>
	<div style="background:green; width:10px; height:10px; float:left"></div>
</body>

In http://lists.w3.org/Archives/Public/www-style/2011Mar/0650.html I discuss an alternative approach that avoids making such cases undefined.




Issue 229: http://wiki.csswg.org/spec/css2.1#issue-229

Summary
    Floats effect on lines above placeholder
Testcase
    2 basic testcases for issue 229
[http://www.gtalbot.org/BrowserBugsSection/css21testsuite/testcase-for-issue-229.html]
URL
    http://lists.w3.org/Archives/Public/www-style/2010Sep/0149.html
http://lists.w3.org/Archives/Public/www-style/2010Oct/0245.html
Proposal
    Add, “If, within the BFC, there is an in-flow negative vertical margin such
that the floats position is above the position it would be at were all such
negative margins set to zero, the position of the float is undefined.”
Resolution
    Proposal accepted
Status
    Closed.