- From: Gérard Talbot <css21testsuite@gtalbot.org>
- Date: Sat, 26 Oct 2013 13:17:41 -0400
- To: Bruno Fassino <fassino@gmail.com>, Robert Hogan <robhogan@gmail.com>
- Cc: Public CSS test suite mailing list <public-css-testsuite@w3.org>
Le 2013-10-26 12:31, Bruno Fassino a écrit : > On Thu, Oct 24, 2013 at 7:51 PM, Robert Hogan <robhogan@gmail.com> > wrote: > >> I'm questioning the expected rendering of this part of >> margin-collapse-clear-012.htm: >> >> <div id="parent"> >> <div id="float" style="float:left; height: 100px; width: 100px; >> background-color:blue;"></div> >> <div id="self-collapsing-with-clearance" style="clear: both; >> margin-top: 40px; margin-bottom:80px"></div> >> <div id="following-sibling" style="margin-bottom:140px;"></div> >> </div> >> >> The test results expect "self-collapsing-with-clearance" to receive a >> clearance of 60px - this is a result of subtracting the margin-top >> from the height of the float it has to clear (100px - 40px). >> >> However I believe the correct clearance is 20px. I say this because >> the margins in "self-collapsing-with-clearance" collapse together >> giving a collapsed margin-top value of 80px (max(margin-top, >> margin-bottom)) and it is this value that has to be used to determine >> the clearance: 100px - 80px = 20px >> > > > Hi Robert, > > I believe the test is correct. > > It's true that the margins of "self-collapsing-with-clearance" collapse > together to a value of 80px, but the clearance is added: > "to place the (top) border edge of the block even with the bottom outer > edge of the lowest float that is to be cleared" (from > http://www.w3.org/TR/CSS2/visuren.html#flow-control after the part you > mentioned). > > Now where is the "top border edge" of a self collapsing block? > For our case the relevant part is at > http://www.w3.org/TR/CSS2/box.html#collapsing-margins towards the end: > "The position of the element's top border edge is the same as it would > have > been if the element had a non-zero bottom border" > > So the margins of our "self-collapsing-with-clearance" collapse > together to > 80px and the top border edge of the box is at 40px in the middle of > that. > Clearance has to be added to this position, not to the whole 80px. So > clearance is 60px as stated in the test, not only 20px. > > Same thing for the other test margin-collapse-clear-012.htm. > > I hope this is clear and correct (each time I reread these parts of the > spec and try to apply them a non trivial case, I found this operation > difficult). > Robert, I have been very busy recently; my to-do list is rather long and complex these days. Just today I discovered unexpected and mysterious issues with Firefox 24 (suddenly, colors are different! ... long story here)... no idea what's causing this.. os settings, anti-aliasing.. <sigh> I have read your email and will be re-examining tests and re-examining carefully spec statements involving an element whose margins collapse through it. http://www.w3.org/TR/CSS21/box.html#collapsed-through Every opportunity to improve a test (or a set of tests) with judicious comments, explanations, test assert, that can illustrate/demonstrate/explain some spec statements should be taken. And so, Robert, this should be the case with your email referring to margin-collapse-clear-012.htm and margin-collapse-clear-013.htm > > On Thu, Oct 24, 2013 at 3:11 AM, Gérard Talbot > <css21testsuite@gtalbot.org>wrote: >> I can see 1 comment (lines 96 to 98) in margin-collapse-clear-013.htm > which is not right though. > > Sure! We probably copied this comment from the previous test, > forgetting to > adapt it. > It should say: > > (140px - 40px) : part of #clear-left's margin-bottom exceeding > #clear-left's margin-top > > or something like that. > > > Bruno Bruno, thanks for replying to Robert and for this correction. I'm adding this to my to-do-list... probably next week. Must go now... Thanks to both of you, Gérard -- Web authors' contributions to CSS 2.1 test suite http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html CSS 2.1 Test suite RC6, March 23rd 2011 http://test.csswg.org/suites/css2.1/20110323/html4/toc.html
Received on Saturday, 26 October 2013 17:18:13 UTC