RE: 3 Microsoft margin collapsing tests (wrt float, clear and clearance)

>> c) The markup is
>>
>>         <div id="div1">
>>             <div id="div2">
>>                 <div id="div3"></div>
>>                 <div id="div4"></div>
>>             </div>
>>             <div id="div5"></div>
>>         </div>
>>
>> Again, what would be best for CSS newbies, ordinary web authors
>> wishing to
>> see/examine examples of margin collapsing for learning purposes. I
>> suggest
>> more intuitive, meaningful id semantic.
>>
>>         <div id="containing-block">
>>             <div id="div2">
>>                 <div id="div3"></div>
>>                 <div id="clear-both"></div>
>>             </div>
>>             <div id="ordinary-sibling"></div>
>>         </div>
>
> Love the idea. I wish I would have thought about it when we created all
> of our tests. Unfortunately I want to keep all of our cases consistent
> across the entire test suite. For now I am going to leave it as div1,
> div2, etc. but if I have time I might change all the tests that we have
> submitted.

This is not the first time that I express the desire to see tests using 
more intuitive, meaningful and self-explanatory id attribute value. This
is furthermore important to do when the testcase is complex, using many
elements. Adding a 6th <div> in the testcase will make the testcase
harder to understand for ordinary web authors.

You have to understand that the most difficult to predict rendered
layout for ordinary web authors are cases involving float, clearance and
margin collapsing:
- there is no debugging tool (Dev. toolbar, DOM inspector, DragonFly,
Web Inspector) that actually helps figure out float, clearance, margin
collapsing
- float, clearance, margin collapsing involve margins and gaps which are
not visible most of the time... while a green border is utterly easy to
see, to understand most of the time
- float and clearance often have a counter-intuitive behavior: the
rendered layouts are confusing, deceptive
- the spec covering float, clearance and margin collapsing is much
harder to grasp well.
- some people are furthermore burdened because english may not be their
natural tongue

I wish Microsoft's testcases here could be improved accordingly. The CSS
2.1 test suite is for sure going to be a recommended reference for web
authors for many years ahead. And the CSS 2.1 spec does not have a lot
of examples, schematic drawings, etc.

regards, Gérard Talbot

Received on Thursday, 21 January 2010 03:28:04 UTC