- From: Staffan Måhlén <staffan.mahlen@comhem.se>
- Date: Fri, 06 Aug 2004 18:48:40 +0200
- To: Justin Wood <jw6057@bacon.qcc.mass.edu>
- Cc: W3C Style List <www-style@w3.org>
On 5 Aug 2004 at 16:29, Justin Wood wrote:
> Staffan Måhlén wrote:
>
> >What is the intention of and examples of the collapse-through definition at
> >http://www.w3.org/TR/CSS21/box.html#collapsing-margins:
...
> Where the p with class "emptyP" would have computed height of
> "0"....meaning the margin-boxes would adjoin...thus the actual margin
> would not be 40px, but rather the greater of the two around it, meaning
> Paragraph 2, with 25px;
Thanks for the reply. I dont think i really asked how it worked, but rather
what the intentions behind the feature were. Your reply may however have proved
my point. If a poster to www-style makes a misstake in what the effect is after
reading the section would a regular author:
- expect the resulting distance between the first and second paragraph to be 40px?
- if he set a 'height', 'border' or 'padding' to the empty paragraph and the
margins stopped collapsing through the element, would that typically make sense
to the author?
- If he added a text into the element, but set the 'height' to 0, would he expect
it to not collapse-through?
- If he floated the empty element, would expect that the float would
push away lines for a height of 80px? (This dosen't work in all implementations)
- Would he expect the collapse with children to stop when setting 'overflow: scroll'?
- Is it obvious that the outer div below has a line-box?
<div style="height: 0px"><div>A line-box</div></div>
> (yes line-height is sensitive, and in-fact some UA's may even treat
> empty content as needing no line-height quite appropriately).
I didn't get that point.
The reply i expected was something like:
"It's a legacy feature based on old UA:s empty <p> handling of
HTML but it works reasonably interoperably, so we are reverse
engineering it into CSS 2.1 even though it may fit poorly in the CSS
model. This will make current practice defined."
but perhaps written more politely. I could of course understand that, but since i
am unsure of whether there are important use cases i would prefer understanding
why this works the way it does.
My personal opinion is currently that some future version of CSS should make
margin-collapse only apply between adjacent siblings in normal flow. Anyway,
this part of the rec needs more examples if thats still possible to add.
/Staffan
Received on Friday, 6 August 2004 12:49:32 UTC